Skip to content

Commit 705153a

Browse files
authored
Improve docstring clarity in frequency_finder.py
Updated docstrings for get_letter_count and get_item_at_index_zero functions for clarity.
1 parent b63f5da commit 705153a

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

strings/frequency_finder.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@
3636

3737

3838
def get_letter_count(message: str) -> dict[str, int]:
39-
"""get_letter_count() is a function that takes message as parameter which is
40-
supposed to be the string. and it returns a dictionary where string is a key
41-
and integer is a value."""
39+
"""get_letter_count() takes message as a parameter, which should be a string.
40+
It returns a dictionary where the string is a key and an integer is a value."""
4241
letter_count = dict.fromkeys(string.ascii_uppercase, 0)
4342
for letter in message.upper():
4443
if letter in LETTERS:
@@ -48,7 +47,7 @@ def get_letter_count(message: str) -> dict[str, int]:
4847

4948

5049
def get_item_at_index_zero(x: tuple) -> str:
51-
"""It takes x as parameter which is tuple and returns a string."""
50+
"""Take a tuple x as a parameter and return a string."""
5251
return x[0]
5352

5453

0 commit comments

Comments
 (0)