@virnuls/

Palindrome - String Slicing

Python

One of the OCR Coding Challenges

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
word = input("Please enter a word or phrase: ")
if word.lower() == word[::-1].lower():
  print("That is a palindrome.")
else:
  print("That is not a palindrome.")