Created
March 25, 2015 00:38
-
-
Save mtayseer/8fee5fb9630bb54c8145 to your computer and use it in GitHub Desktop.
Check if two statements are anagrams
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to run? | |
# > python are_anagrams.py hello lolhe | |
# True | |
from collections import Counter | |
import sys | |
print(Counter(sys.argv[1]) == Counter(sys.argv[2])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment