Unit 8 and 10 Hacks

Lists and Iteration Exercises

Exercise #1

Exercise #2

Multiple Choice Quiz

I got a 9/10 on the quiz.

To the question, “How can we add something to the end of a list?”, I chose “Extend”, instead of the correct answer, “Append”. Appending in Python, refers to adding its arguments as a single element to the end of a list. In other words, the length of the list keeps increasing by one. In extending, you are adding two lists together but in appending, you are just adding one thing to the list.