Find whether two strings are anagrams

PHOTO EMBED

Mon Mar 08 2021 22:27:19 GMT+0000 (Coordinated Universal Time)

Saved by @randomize_first #python

from collections import Counter

str_1, str_2, str_3 = "acbde", "abced", "abcda"
cnt_1, cnt_2, cnt_3  = Counter(str_1), Counter(str_2), Counter(str_3)

if cnt_1 == cnt_2:
    print('1 and 2 anagram')
if cnt_1 == cnt_3:
    print('1 and 3 anagram')
content_copyCOPY