Check if two strings are anagrams (contain all the same letters in any order)
from collections import Counter
def is_anagram(str1, str2):
return Counter(str1) == Counter(str2)
print(is_anagram('geek', 'eegk'))
# True
print(is_anagram('geek', 'peek'))
# False