We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import collections
def check_anagram(data1,data2):
results = dict(collections.Counter(data1)) sort_orders = sorted(results.items(), key=lambda x: x[1], reverse=True) if(sort_orders[0][1] > 1): return False elif len(data1) == len(data2): if(sorted(data1.lower()) == sorted(data2.lower())): return True return False return False
print(check_anagram("eat", "tea")) print(check_anagram("backward","drawback")) print(check_anagram("Reductions","discounter")) print(check_anagram("About", "table"))
The text was updated successfully, but these errors were encountered:
Solution of Programming Fundamentals using Python Day 8, Problem Assignment 54
Sorry, something went wrong.
Message that will be displayed on users' first issue
No branches or pull requests
import collections
def check_anagram(data1,data2):
print(check_anagram("eat", "tea"))
print(check_anagram("backward","drawback"))
print(check_anagram("Reductions","discounter"))
print(check_anagram("About", "table"))
The text was updated successfully, but these errors were encountered: