Skip to content

Instantly share code, notes, and snippets.

@Abhayparashar31
Created April 4, 2021 09:53
Show Gist options
  • Save Abhayparashar31/10e35e52307e927cbf6100dd8d2bc85e to your computer and use it in GitHub Desktop.
Save Abhayparashar31/10e35e52307e927cbf6100dd8d2bc85e to your computer and use it in GitHub Desktop.
def check_anagram(first_word, second_word):
return sorted(first_word) == sorted(second_word)
print(check_anagram("silent", "listen")) # True
print(check_anagram("ginger", "danger")) # False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment