1n = input("Enter the word and see if it is palindrome: ") #check palindrome
2if n == n[::-1]:
3 print("This word is palindrome")
4else:
5 print("This word is not palindrome")
1>>> def isPalindrome(s):
2 ''' check if a number is a Palindrome '''
3 s = str(s)
4 return s == s[::-1]
5
6>>> def generate_palindrome(minx,maxx):
7 ''' return a list of Palindrome number in a given range '''
8 tmpList = []
9 for i in range(minx,maxx+1):
10 if isPalindrome(i):
11 tmpList.append(i)
12
13 return tmpList
14
15>>> generate_palindrome(1,120)
16
17[1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111]
18
1s=input("enter:")
2temp=s
3c=0
4v=0
5print(temp)
6for i in s:
7 c=c+1
8for j in range(c):
9 if temp[v]==s[c-1]:
10 c=c-1
11 v=v+1
12 flag=1
13 else:
14 flag=0
15if flag==1:
16 print("p")
17elif flag==0:
18 print("no")
19
1#A palindrome is a word, number, phrase, or other sequence of characters which reads the same backward as forward.
2#Ex: madam or racecar.
3#CODE BY VENOM
4a=input("Enter you string:\n")
5w=str(a)
6if w==w[::-1]: # w[::-1] it will reverse the given string value.
7 print("Given String is palindrome")
8else:
9 print("Given String is not palindrome")
10#CODE BY VENOM
11#CODE BY VENOM
12
1n = input("Enter the word and see if it is palindrome: ") #check palindrome
2if n == n[::-1]:
3 print("This word is palindrome")
4else:
5 print("This word is not palindrome")
6 print("franco")