How to find Index of Substring in a Python String?

Опубликовано: 17 Октябрь 2023
на канале: ProgramGuru
56
2

To find the index of substring 'y' in the string 'x', you can use the string find() method. Call find method on the string ‘x’, and pass the substring, ‘y’, as argument. The method returns an integer value, representing the position of the substring, in the string.

References
=========
Python - String find() method
https://www.tutorialkart.com/python/p...

Python Tutorial
https://www.tutorialkart.com/python/