A String is a Palindrome in Python || String Manipulation || Python

In this we are going to see a basic example of A String is a Palindrome in Python in Python Programming Language.

def palindrome():
    str1 = "madam"
    if str1 == str1[::-1]:
        print("Palindrome")
    else:
        print("Not Palindrome")

palindrome()

# Coded By Dhiraj Shelke

#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post