realpython/python-basics-exercises

Can this be done more efficiently?

jmchamber58 opened this issue · 1 comments

I notice you doing the same thing repeatedly for nouns, verbs, and adjectives. Would a for loop work here to loop through a range (3) for items in noun, verb, adjective? I can't figure out how to do it though.

@jmchamber58 Yes, it could be done with less code. I will make a second solution available that does not contain so much repetition.