Palindrome program in Python

  • Read the given input and hold it in the temporary variable.
  • Reverse the input.
  • Compare temporary variable with reversed input.
  • If both are the same, the input string or number is a palindrome.
  • Else input string or number is not a palindrome.
  • End the program.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store