Advertisement
Josif_tepe

Untitled

Oct 19th, 2024
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. import math
  2.  
  3. def main():
  4.     a = input("Prv string: ")
  5.     b = input("Vtor string: ")
  6.  
  7.     sorted_a = "".join(sorted(a))
  8.     sorted_b = "".join(sorted(b))
  9.  
  10.     if sorted_a == sorted_b:
  11.         print("Anagram")
  12.     else:
  13.         print("Ne e anagram!")
  14.  
  15.  
  16.  
  17.  
  18. if __name__ == "__main__":
  19.     main()
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement