SyntaxFix
Write A Post
Hire A Developer
Questions
python enumerate function will be satisfied your requirements
enumerate
result = list(enumerate([1,3,7,12])) print result
output
[(0, 1), (1, 3), (2, 7),(3,12)]