Review Python Lists So Far (Exercises)
Here are a couple of review exercises that you can work on to train the skills that you’ve heard about in the past lessons. Start by creating a list named
food with two elements,
"beans", both of them strings.
And then finally, also create a new list called
lengths. Here you should use a list comprehension to calculate the lengths of each of the strings in the
breakfast list and then put them into the new
Become a Member to join the conversation.