Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

# enumerate

# enumerate
for index, item in enumerate(['sanjose', 'cupertino', 'sunnyvale', 'fremont']):
  print(index, ':', item)
  
# 0 : sanjose
# 1 : cupertino
# 2 : sunnyvale
# 3 : fremont 
 
PREVIOUS NEXT
Tagged: #enumerate
ADD COMMENT
Topic
Name
1+7 =