Find First And Last Substring Occurrences Using find() rfind() index() rindex() | Python Tutorial
ฝัง
- เผยแพร่เมื่อ 20 ก.ย. 2024
- How to find the first and last occurrences of a character or a substring in a string using the string methods find() rfind() index() and rindex() in Python. Source code: github.com/por.... Check out www.portfolioc... to build a portfolio that will impress employers!
I'm guessing the index function would be ideal if used in a try and except to let the user know that the input is invalid. Interesting video!
Have you thought about doing an argparse video for Python? I've seen videos on the matter, but I think you would make a great video on it. 🙏
Yes, that's exactly when it would be useful Ivan! :-)
And I definitely want to do an argparse video for Python too.
Straight forward and precise. Thanks
You're welcome! :-)
Good