+ 1
How can i
run for loop in python from 20 to 1
3 Answers
+ 4
for i in range(20,0,-1):
print(i)
+ 3
Another way
print(list(range(20, 0, -1))) #one line
or
number = list(range(20, 0, -1)) #two lines
print(number)
+ 2
@Ferhat Sevim thankyou
run for loop in python from 20 to 1