Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python for loop

# if you want to get items and index at the same time,
# use enumerate
fruits = ['Apple','Banana','Orange']

for indx, fruit in enumerate(fruits):
	print(fruit, 'index:', indx)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #loop
ADD COMMENT
Topic
Name
7+3 =