In this program, we will take a user input as a list and get palindrome numbers from a given list.
Palindrome numbers in a list:
Steps to solve the program
- Take a list as input and create an empty list.
- Calculate the reverse of each number from the given list using for and while loop.
- Check if the original number and reversed numbers are equal or not.
- if equal then add those reverse number to the empty list.
- Print the list to see the result.
Output :
Related Articles
Python program to get a count of vowels in the given list.
Python program to get the list of prime numbers in a given list.
Python program to get a list with n elements removed from the left and right.
Python program to create a dictionary with two lists.
Python program to remove the duplicate item from the list using set.
Python program to insert a sublist into the list at a specific index.