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 www.pythontutorial.net #
 
PREVIOUS NEXT
Tagged: #python #loop
ADD COMMENT
Topic
Name
5+2 =