Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python enumerate


values = ["a", "b", "c", "d", "e", "f", "g", "h"]

for count, value in enumerate(values): 
      print(count,value)


#the example below produces no error
for count, value in enumerate(values):
       values.remove(values[count+1])
       print(count, value)
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #python #enumerate
ADD COMMENT
Topic
Name
8+6 =