Tags
Asked 3 years ago
6 Aug 2021
Views 250
Tamara

Tamara posted

How to loop backwards in python?

How to loop backwards in python?
jaman

jaman
answered Aug 8 '21 00:00

following code is for loop in backwards in Python with while loop

i=10
while(i>=0):
	print(i,end="")
	i=i-1;
print()

it will print backward

10 9 8 7 6 5 4 3 2 1 0 
Post Answer