Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to iterate through a list in python

def iterate(L):
  for index, item in enumerate(L):
    print(f'{item} at index: {index}')
    
iterate([3, 5, 2, 1])
    
Source by www.askpython.com #
 
PREVIOUS NEXT
Tagged: #iterate #list #python
ADD COMMENT
Topic
Name
8+2 =