For example, finding nth the a in the string abcdefg.
CodePudding user response:
I think find() is what you are looking for.
example = "abcdefg"
print(example.find("a"))
This should return 0.

For example, finding nth the a in the string abcdefg.
CodePudding user response:
I think find() is what you are looking for.
example = "abcdefg"
print(example.find("a"))
This should return 0.