Python Problem 4 | Python Tutorials For Absolute Beginners In Hindi #109

Python Practice problem 4 (Easy, 10 points)

The Next Palindrome

Problem Statement

A palindrome is a string which when reversed is equal to itself:

Examples of palindrome includes 616, mom, 676, 100001

You have to take a number as an input from the user. You have to find the next palindrome corresponding to that number. Your first input should be ‘number of test cases’ and then take all the cases as input from the user


Input:

3

451

10

2133


Output:

Next palindrome for 451 is 454

Next palindrome for 10 is 11

Next palindrome for 2133 is 2222

►Full Python tutorials for absolute beginners (Hindi) playlist - https://www.youtube.com/playlist?list=PLu0W_9lII9agICnT8t4iYVSZ3eykIAOME
►Click here to subscribe - https://www.youtube.com/channel/UCeVMnSShP_Iviwkknt83cww


Be the first person to comment!

Comments(0)