We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d72afad commit 3603a1dCopy full SHA for 3603a1d
check_anagram.py
@@ -0,0 +1,14 @@
1
+'''Python Function: Check if two words are anagram.
2
+'''
3
+
4
5
+def check_anagram(word1, word2):
6
+ if sorted(word1.lower()) == sorted(word2.lower()):
7
+ print(f"'{word1}' and '{word2}' are anagram.")
8
+ else:
9
+ print(f"'{word1}' and '{word2}' are not anagram.")
10
11
12
+check_anagram("elbow", "below")
13
+check_anagram("desserts", "stressed")
14
+check_anagram("hello", "olhe")
0 commit comments