Lecture 10: Lists, Memory Diagrams & Mutable vs. Immutable Sequences

Slides

Four per page (with some fill-in-the-blanks and missing intermediate steps in list diagram mutation sequences). This is the version we expect you to read before lecture.

Complete four-slides-per-page pdf version of slides (with fill-in-the-blanks filled in and all intermediate list diagrams). This is the version we will use during lecture. It has more details on the intermediate list diagrams in examples than the above version. You might want to review this before lecture if you have questions about the intermediate steps of the mutation examples.

Complete one-slides-per-page pdf version of slides (with fill-in-the-blanks filled in and all intermediate list diagrams). This is a one-slide-per-page version of the slides with all intermediate list diagram steps shown. This is useful for comparing before/after diagrams for list mutation operations.

Readings

Think Python, Ch. 10: Lists.

Code

Click on this lec10_list_diagrams.zip link to download the .zip file to your computer.

Solutions

Solution to the Memory Diagram quiz on slide 10-23 of handouts.

HTML solutions for the notebook.

lec10_list_diagrams_solns.zip link