text = "iiiiiiWiiiiiiWWiiiiW"
for char in text:
if (char == "W"):
z = text.index(char)
print z
I'm having a problem with the above code. I'm not getting my desired response. I am receiving:
>>>9
>>>9
>>>9
>>>9
...instead of getting something like...
>>>9
>>>16
>>>17
>>>22
This is confusing me :( please help and thanks :)