Skip to content

Commit bfc578e

Browse files
authored
fixed typo in itertools compress approach. (#3808)
1 parent 5ad6668 commit bfc578e

File tree

1 file changed

+1
-1
lines changed
  • exercises/practice/raindrops/.approaches/itertools-compress

1 file changed

+1
-1
lines changed

exercises/practice/raindrops/.approaches/itertools-compress/content.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If the 'sounds' string is empty, a string version of the number is returned inst
1919
This is very succinct code that avoids string concatenation.
2020
However, it does require the overhead of importing `compress()` from the [itertools][itertools] module.
2121
The code is also harder to maintain should there be additional factors/sounds needed.
22-
Because the factors and sounds are seperated, there is a chance mistakes could be made like forgetting a number or swapping which factor is paired with which sound.
22+
Because the factors and sounds are separated, there is a chance mistakes could be made like forgetting a number or swapping which factor is paired with which sound.
2323

2424
A better approach for maintenance might be to turn the 'sounds' `tuple` into a dictionary where the factors and sounds can be stored separate from the logic that does the calculations and string creation:
2525

0 commit comments

Comments
 (0)