The Python Oracle

Find index of last occurrence of a substring in a string

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Track title: CC E Schuberts Piano Sonata D 784 in A

--

Chapters
00:00 Question
00:32 Accepted answer (Score 818)
00:49 Answer 2 (Score 114)
01:57 Answer 3 (Score 49)
02:11 Answer 4 (Score 10)
03:16 Thank you

--

Full question
https://stackoverflow.com/questions/9572...

Accepted answer links:
[.rfind()]: http://docs.python.org/py3k/library/stdt...
[str()]: http://docs.python.org/py3k/library/func...

Answer 2 links:
[rfind()]: https://docs.python.org/3/library/stdtyp...
[rindex()]: https://docs.python.org/3/library/stdtyp...
[rfind()]: https://docs.python.org/2/library/string...
[rindex()]: https://docs.python.org/2/library/string...
[ValueError]: https://docs.python.org/3/library/except...
[ValueError]: https://docs.python.org/2/library/except...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #string

#avk47