Advertisement
k1alo

R5

Oct 6th, 2023
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. line = "Я - арка края"
  2. line = line.lower()
  3. line = line.replace('-', '')
  4. line = line.replace(' ', '')
  5. line1 = line[:: -1]
  6. if line == line1:
  7.     print("Это палиндром")
  8. else:
  9.     print("Это не палиндром")
  10. print(line1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement