Python print elment in revrse order

var=int(input("Enter number:"))

for i in reversed(range(1,var+1)):

    print(i)


$ python userinput.py

Enter number:10

10

9

8

7

6

5

4

3

2

1

Share on Google Plus

About Penguin Technology

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

0 comments:

Post a Comment