Advertisement
Dido09

Palindrome

Nov 23rd, 2021
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. text = input()
  2.  
  3. def my_poolindrome(s):
  4. return s == s[::-1]
  5. print(my_poolindrome(text))
  6.  
  7. ///////////////////////////////////////////////
  8.  
  9. text = input()
  10.  
  11. def is_polindrom(n):
  12. n_str = str(n)
  13. for i in range(len(n_str) // 2 + 1):
  14. if n_str[i] != n_str[-(i + 1)]:
  15. return 0
  16. return 1
  17.  
  18. print(is_polindrom(text))
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement