str=input("Please Enter a string: ") print("The",str, "in reverse order is:") length=len(str) for a in range(-1,(-length-1),-1): print(str[a]) Output: Please Enter a string: Navin The Navin in reverse order is: n i v a N
इन्हें भी देखें।
- while loop
- for loop
- nested loops
- loop control statements (Break, Continue, Pass)
- if statement
- if-else statement
- if-elif statement
- nested if statement
- range() function
- keywords
- Identifiers (names)
- Literals
- Operators
- punctuatorts
Python Programs के लिये यहाँ click करें।