Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

enumerate in python

mydict = {1: 'a', 2: 'b'}
for i, (k, v) in enumerate(mydict.items()):
    print(i,k,v)
    
#will print   
# 0 1 a
# 1 2 b
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #enumerate #python
ADD COMMENT
Topic
Name
8+5 =