test = [ 'test 1', 'test 2', 'test 3' ] for index, value in enumerate( test ): print( index, value )
list.index(element)
# To get value from index in a list: x = ["Foo", "Bar", "Roblox"] print(x[0]) # Output: Foo
value_at_index = dic.values()[index]
# To return the index of the first occurence of element x in lst ind = lst.index(x)