Skip to content

Commit ddd7957

Browse files
docs: fix typos and improve description in anagrams.py
Added a brief definition of what an anagram is in the docstring to make the documentation clearer for beginners.
1 parent 25bcced commit ddd7957

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

strings/anagrams.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ def signature(word: str) -> str:
2424

2525
def anagram(my_word: str) -> list[str]:
2626
"""
27+
An anagram is a word or phrase formed by rearranging the letters of a different
28+
word or phrase, typically using all the original letters exactly once.
29+
2730
Return every anagram of the given word from the dictionary.
31+
2832
2933
>>> anagram('test')
3034
['sett', 'stet', 'test']

0 commit comments

Comments
 (0)