First few palindrome numbers are 0, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 11 , 22 , 33 , 44 , 55 , 66 , 77 , 88 , 99 , 101 , 111 , 121 , ... and so on.
Input format: Given a number n, size of list then next line contains space separated n numbers.
Logic: We will simply convert the number into string and then using reversed(string) predefined function in python ,we will check whether the reversed string is same as the number or not.
Program:
Output

need an explanation for this answer? contact us directly to get an explanation for this answer