Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. slowo1 = str(input("Podaj zdanie 1: "))
  2. slowo2 = str(input("Podaj zdanie 2: "))
  3.  
  4. slowa = [" ", ",", ".", "!", "@", ";", "\"", "\\", "?"]
  5.  
  6. for i in slowa:
  7. slowo1 = slowo1.replace(i, "")
  8. slowo2 = slowo2.replace(i, "")
  9.  
  10. if(sorted(slowo1.upper()) == sorted(slowo2.upper())):
  11. print("To zdanie to anagram")
  12. else:
  13. print("To zdanie to nie anagram")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement