Created
March 12, 2018 21:12
-
-
Save dogac00/d241ac50787c443e71f8ffa1fa92600f to your computer and use it in GitHub Desktop.
Scramblies @codewars
This file contains 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
from collections import Counter | |
def scramble(s1, s2): | |
letters = Counter(s1) | |
word = Counter(s2) | |
diff = word - letters | |
return len(diff) == 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment