Question: PYTHON 3 Problem Complete the function isAnagram() to take in two strings and return True if word1 is an anagram of word2. A word is
PYTHON 3

Problem
Complete the function isAnagram() to take in two strings and return True if word1 is an anagram of word2. A word is said to be an anagram of another if its letters can be re-arranged to create the other word.
Your solution must complete in O(n).
Hint: use a dictionary :)
Complete Code:
def isAnagram(word1, word2):
print(isAnagram("hello", "ohell")) # prints True print(isAnagram("a", "abcd")) # prints False
Instructions from your teacher Problem def isAnagram(word1, word2): 2 4 86 Complete the function isAnagram) to take in two strings and return True if wordl is an anagram of word2. A word is said to be an anagram of another if its letters can be re-arranged to create the other word print(?sAnagram("hello", print(?sAnagran("a", "ohell"))#prints "abcd")) # prints False True 7 Your solution must complete in O(n) Hint: use a dictionary:)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
