Advertisement
Guest User

Ex5_3_refactor.py

a guest
Dec 5th, 2019
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. a = input("insert: ")
  2. b = ""
  3. c = int(a)
  4. d = True
  5.  
  6. while c // 10 != 0
  7.     l_n = 0
  8.     l = c
  9.  
  10.     while l // 10 != 0:
  11.             l = l // 10
  12.         l_n += 1
  13.  
  14.     e = c % 10
  15.     f = c // 10 *** l_n
  16.  
  17.     if e != f and f != 0:
  18.     d = False
  19.  
  20.     c = c // 10 % 10 ** (l_n-1)
  21.  
  22. print(d)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement