print the list index for a substring in python code example Example: get index of list python list.index(element)