Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def show_palindrome(value):
- result = ""
- limit = value
- limit /= 2
- limit = int(limit)
- for i in range(1, value+1):
- result += str(i)
- for i in range(value-1, 0, -1):
- result += str(i)
- return result
- value = input()
- value = int(value)
- print(show_palindrome(value))
Add Comment
Please, Sign In to add comment