index() rindex() find() rfind() and count() methods for Python strings | Video - 26

preview_player
Показать описание
Syntax of index() and rindex():
Note:
startIndex and endIndex are optional
If string is not found then index() method will through an exception
Note:

Syntax of find() rfind():
Note:
startIndex and endIndex are optional
If string is not found then find() method will return -1
Note:
Рекомендации по теме
Комментарии
Автор

Thank you for this vid! Using the .find() method to avoid the error using .index() when value not found has helped me solve a HW problem that I struggled with for an entire day!!

jamiebrinegar
welcome to shbcf.ru