Skip to content

Instantly share code, notes, and snippets.

@popey456963
Created October 25, 2015 16:18
Show Gist options
  • Save popey456963/e205164fb6253403c98e to your computer and use it in GitHub Desktop.
Save popey456963/e205164fb6253403c98e to your computer and use it in GitHub Desktop.
Testing Anagrams
s1, s2 = input().split(" ")
if sorted(s1) == sorted(s2): print("Anagram")
else: print("Not Anagram")
@popey456963
Copy link
Author

s,m=input().split(),sorted
print((0,1)[m(s[0])==m(s[1])])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment