Get index of a list

Get list's index

#index

>>> S = [1,30,20,30,2]
>>> for index, elem in enumerate(S):
        print(index, elem)

(0, 1)
(1, 30)
(2, 20)
(3, 30)
(4, 2)

Created Wed, Aug 3, 2016 9:05 PM by Ahmet Faruk Bişkinler
Last Updated Wed, Aug 3, 2016 9:06 PM by Ahmet Faruk Bişkinler