Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python for loop

#From a minimum (inclusive) to maximum (exclusive).
#Minimum is 0 unless otherwise specified

for i in range(4)
	print(i) #0, 1, 2, 3
  
for i in range(2, 4)
	print(i) #2, 3
  
for i in range(1, 7, 2):
  print(i) #1, 3, 5
 
PREVIOUS NEXT
Tagged: #python #loop
ADD COMMENT
Topic
Name
9+4 =