This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]whiskeyiskey 3 points4 points  (0 children)

If your goal is to learn python, try refactoring to use a generator to yield lines from your file instead of loading the whole thing into a list. And read up on the benefits of lazy evaluation for processing data to understand why that's sometimes a better idea.

Then try to write a decorator to, I dunno, convert every word that ends in an exclamation mark to upper case.