Learn Python
Strings
3.7
Lesson

Check the position of character or string

We can find the index of a character or string using the function index().

In the example given below, we are trying to find the position of r in the string Big Binary:

In this next example, we are trying to find the starting position of Binary in the string Big Binary: