Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python for loop

A for loop iterates through an iterable, may that be an array, a string, or a range of numbers
#Example:
myArr = ["string 1", "string 2"]
for x in myArr:
  print(x)
#Returns "string 1", "string 2". In here the x is an iterator and does not need to be defined.
Source by www.pythontutorial.net #
 
PREVIOUS NEXT
Tagged: #python #loop
ADD COMMENT
Topic
Name
3+6 =