Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- napis = str(input("Podaj zdanie: "))
- slowa = [" ", ",", ".", "!", "@", ";", "\"", "\\", "?"]
- for i in slowa:
- napis = napis.replace(i, "")
- if(napis=="".join(reversed(napis))):
- print("To zdanie to palindrom")
- else:
- print("To zdanie to nie palindrom")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement