Answers for "how to loop on python"

3

python for loop

for i in range(5):
	print(i) #0, 1, 2, 3, 4
for i in range(2, 8):
  	print(i) #2, 3, 4, 5, 6, 7, 8
for i in range(2, 10, 2):
  	print(i) #2, 4, 6, 8, 10
for i in (['a', 'b', 'c']):
  print(i) #a, b, c
Posted by: Guest on December-29-2020
25

python for loop range

for i in range(0, 3):
    print(i)
Posted by: Guest on January-10-2020
6

for loop in python

for x in range(6):

	 
	print(x)
Posted by: Guest on August-07-2020
2

for loop example python 3

for num in nums:
     for letter in 'abs':
         print(num, letter)
Posted by: Guest on April-13-2020

Python Answers by Framework

Browse Popular Code Answers by Language