Is there any way to find out what nth, a specific character is on a string?
Question:
For example, finding nth the a
in the string abcdefg
.
Answers:
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
.
I think find()
is what you are looking for.
example = "abcdefg"
print(example.find("a"))
This should return 0.