{"id":20025,"date":"2021-09-06T13:32:57","date_gmt":"2021-09-06T08:02:57","guid":{"rendered":"https:\/\/python-programs.com\/?p=20025"},"modified":"2021-11-22T18:36:29","modified_gmt":"2021-11-22T13:06:29","slug":"python-program-to-print-palindrome-numbers-in-a-range","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-print-palindrome-numbers-in-a-range\/","title":{"rendered":"Python Program to Print Palindrome Numbers in a Range"},"content":{"rendered":"

In the previous article, we have discussed Python Program to get First Element of each Tuple in a List<\/a><\/p>\n

Palindrome:<\/strong><\/p>\n

If a number reads the same both forward and backward, it is called a Palindrome number. And the insane part is that it doesn\u2019t just apply to numbers. Even if a string reads the same in both directions, it is always a Palindrome!<\/p>\n

Given lower limit and upper limit range and the task is to print the palindrome numbers in a given range.<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given lower limit = 50\r\nGiven upper limit= 130<\/pre>\n

Output:<\/strong><\/p>\n

The palindrome numbers between 50 and 130 are:\r\n55 66 77 88 99 101 111 121<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given lower limit = 1\r\nGiven upper limit= 300<\/pre>\n

Output:<\/strong><\/p>\n

The palindrome numbers between 1 and 300 are:\r\n1 2 3 4 5 6 7 8 9 11 22 33 44 55 66 77 88 99 101 111 121 131 141 151 161 171 181 191 202 212 222 232 242 252 262 272 282 292<\/pre>\n

Program to Print Palindrome Numbers in a Range in Python<\/h2>\n

Below are the ways to print the palindrome numbers in a given range:<\/p>\n