Python: Position of next occurrence of a sub-string

Python code to get the position of next or second occurrence of a sub-string within a string.

Note: Above code works in both Python 2 and Python 3

Output:
position-of-second-occurence-python

About the Author

SRINI S

A passionate blogger. Love to share solutions and best practices on wordpress hosting, issues and fixes, excel VBA macros and other apps

Leave a Reply

Your email address will not be published. Required fields are marked *