demo_ref_string_find_vs_index.py:
➜ begtut>python demo_string_find_vs_index.py
-1
Traceback (most recent call last):
  File "demo_ref_string_find_vs_index.py", line 4 in <module>
    print(txt.index("q"))
ValueError: substring not found