We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 241f9c8 commit 0e98f1aCopy full SHA for 0e98f1a
strings/check_anagrams.py
@@ -7,8 +7,15 @@
7
8
def check_anagrams(first_str: str, second_str: str) -> bool:
9
"""
10
- Two strings are anagrams if they are made up of the same letters but are
11
- arranged differently (ignoring the case).
+ Check whether two strings are anagrams of each other.
+
12
+ Two strings are anagrams if they contain the same characters
13
+ with the same frequency, ignoring case and whitespace.
14
15
+ :param first_str: first input string
16
+ :param second_str: second input string
17
+ :return: True if strings are anagrams, False otherwise
18
19
>>> check_anagrams('Silent', 'Listen')
20
True
21
>>> check_anagrams('This is a string', 'Is this a string')
0 commit comments