216k views
4 votes
Write a code palindrome in python

2 Answers

3 votes

Answer:

Step-by-step explanation:

Palindrome Program A string is called a palindrome string if the reverse of that string is the same as the original string. For example, radar , level , etc. Similarly, a number that is equal to the reverse of that same number is called a palindrome number. For example, 3553, 12321, etc.

User Kristijan
by
8.0k points
3 votes

Answer:

def is_palindrome(string):

reversed_string = string[::-1]

return string == reversed_string

User Narendran
by
8.0k points