Created
May 28, 2022 14:47
-
-
Save Pythonian/a66ad378638cef453802f80607fbea0b to your computer and use it in GitHub Desktop.
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
def find_anagram(word, anagram): | |
if sorted(word) == sorted(anagram): | |
print(f"TRUE::: '{word} and {anagram}' are anagrams of each other.") | |
else: | |
print(f"FALSE::: The two strings '{word} and {anagram}' contradict each other.") | |
if __name__ == "__main__": | |
find_anagram("below", "elbow") | |
find_anagram("hello", "check") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment