Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to use a for loop in python

a_list = [1,2,3,4,5]

#this loops through each element in the list and sets it equal to x
for x in a_list:
	print(x)
Source by www.datacamp.com #
 
PREVIOUS NEXT
Tagged: #loop #python
ADD COMMENT
Topic
Name
3+2 =