Write a function to check if a string is a palindrome or not


Topic: Write a function to check if a string is a palindrome or not

Solution

def reverse_string(string):
    return string[::-1]
def ispalin(string):
    if string == reverse_string(string):
        return True
    return False



List all Python Programs