muhammad_nasif

TASK_07

Apr 15th, 2021 (edited)
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. def show_palindrome(value):
  2.     result = ""
  3.     limit = value
  4.     limit /= 2
  5.     limit = int(limit)
  6.     for i in range(1, value+1):
  7.         result += str(i)
  8.     for i in range(value-1, 0, -1):
  9.         result += str(i)
  10.     return result
  11.  
  12.  
  13. value = input()
  14. value = int(value)
  15. print(show_palindrome(value))
  16.  
  17.  
Add Comment
Please, Sign In to add comment