How to check palindrome using python code

In this tutorial, we are going to show How to check palindrome using python. We have added the video tutorial and the source code of the program.

Video Tutorial: Check palindrome python code

What is Palindrome?

A palindrome is a word, phrase, number, or other sequences of characters that reads the same backward and forward. An example of a palindrome is the word “radar.”

Source Code

# Python program to check Palindrome 

string  = input('Enter a string : ')

if(string==string[::-1]): 
    print("It's a palindrome!")
else: 
    print("It's not a palindrome!")

Output

Also Read: Python program to create bmi calculator

Join Now : Learn Python Programming Masterclass

Leave a Reply

Your email address will not be published. Required fields are marked *