How could I find out what character a variable is in variable. I hope this doesn't sound too confusing.
What I'm trying to do is make a search engine. I have a variable called "currentchar" which is an integar.
So what I'm trying to do is:
if s[i] in l[currentchar:]: #Just checking if a string is in a string...
currentchar = (Figure out which char "s[i]" started at.)
So for example if s[i]
is "ph"
and l[currentchar:]
is "elephant"
I wan't currentchar
to be set to 3
because "ph"
started 3 characters through "elephant"
.
I hope people understand what I'm trying to say.