examples/lists/index_improved.py
from __future__ import print_function

words = ['cat', 'dog', 'snake', 'camel']

name = 'snake'
if name in words:
    print(words.index(name))

name = 'python'
if name in words:
    print(words.index(name))