Get your own website
-1
Traceback (most recent call last):
  File "demo_ref_string_rfind_vs_rindex.py", line 4 in <module>
    print(txt.rindex("q"))
ValueError: substring not found