num = 1221
      temp = num
      reverse = 0
      while temp > 0:
          remainder = temp % 10
          reverse = (reverse * 10) + remainder
          temp = temp // 10
      if num == reverse:
        print('Palindrome')
      else:
        print("Not Palindrome")
      
      Python language logo

      Find a Number is Palindrome or not

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.