-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
In the file 2_common_pattern.py [1], write a generator called without_punctuation that iterates over a list of strings and removes punctuation characters at the end of the string. If the string is empty after the removal, the string is skipped.
For instance, without_punctuation(['Apple', 'Banana...', 'Carrot!!', '*$', '!Dinosaur']) would yield Apple, Banana, Carrot, and !Dinosaur.
(see the .rstrip method of strings, and the constant punctuation in the module string)
[1] https://github.com/ASPP/2019-camerino-advanced-python/tree/master/notebook/generators/hands_on
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels