demo_ref_list_index.py:
fruits = ['apple', 'banana', 'cherry'] x = fruits.index("cherry") print(x)
➜ begtut>python demo_list_index.py
2