string=input("Please enter a string: ") if(string==string[::-1]): print("Given string is palindrome") else: print("Given string is not palindrome") Output 1: Please enter a string: malayalam Given string is palindrome Output 2: Please enter a string: Hello Given string is not palindrome
इन्हें भी देखें।
- 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 करें।