Affiliate disclosure

Book titles on this page link to Amazon. As an Amazon Associate, DataField.Dev earns from qualifying purchases — at no additional cost to you.

Further Reading: Lists and Tuples

Python Documentation

  • Python Tutorial: Lists (Tier 1) https://docs.python.org/3/tutorial/datastructures.html#more-on-lists The official tutorial's coverage of list methods and operations. Concise, authoritative, and always up to date. Good as a quick reference after you've learned the concepts here.

  • Python Tutorial: Tuples and Sequences (Tier 1) https://docs.python.org/3/tutorial/datastructures.html#tuples-and-sequences The official treatment of tuples, including packing and unpacking. Short but precise.

  • Python Library Reference: copy module (Tier 1) https://docs.python.org/3/library/copy.html Full documentation on shallow vs. deep copying. If you ever need to copy nested data structures, start here.

Understanding Python's Data Model

  • Ned Batchelder, "Facts and Myths about Python Names and Values" (PyCon 2015 talk) (Tier 1) https://nedbatchelder.com/text/names1.html A widely recommended conference talk that explains Python's name/reference model — exactly the concept behind aliasing. Clear visuals, memorable examples. The page above has the video and a full written version.

  • Luciano Ramalho, Fluent Python, 2nd Edition (O'Reilly, 2022). Chapter 6: "Object References, Mutability, and Recycling." (Tier 1) A deep dive into how Python handles mutable and immutable objects, identity vs. equality, the "relative immutability" of tuples that hold lists, and the subtleties of copying. More advanced than what we cover here, but excellent for building deeper understanding.

List Comprehensions

  • Trey Hunner, "Comprehensible Comprehensions" (PyCon Australia 2017; updated version at PyCon US 2020) (Tier 1) https://treyhunner.com/talks A step-by-step guide to reading and writing list comprehensions, including when NOT to use them. Trey Hunner is known for making Python concepts accessible. Recordings of both versions are linked from his talks page.

  • Python Documentation: List Comprehensions (Tier 1) https://docs.python.org/3/tutorial/datastructures.html#list-comprehensions The official tutorial section with clear examples of simple and nested comprehensions.

Data Structures Perspective

  • Downey, Allen B. Think Python, 3rd Edition (2024). Chapters 9–11 (Lists, Dictionaries, Tuples). (Tier 1) https://allendowney.github.io/ThinkPython/ Another open textbook's take on lists, tuples, and dictionaries. Good for a second perspective on the same concepts we cover here. Free online.

  • Sweigart, Al. Automate the Boring Stuff with Python, 3rd Edition (No Starch Press, 2025). Chapter 6: "Lists." (Tier 1) https://automatetheboringstuff.com/ Practical, project-oriented coverage of lists with a focus on automation tasks. Complements this chapter's emphasis on data processing. Free to read online (the 2nd edition, where lists are Chapter 4, is also still available there).

For the Curious

  • The Python collections Module (Tier 1) https://docs.python.org/3/library/collections.html Beyond basic lists and tuples, Python's collections module offers namedtuple, deque, Counter, defaultdict, and more. We previewed namedtuple in this chapter; we'll return to defaultdict in Chapter 9 and deque in Chapter 20.

  • Raymond Hettinger, "Transforming Code into Beautiful, Idiomatic Python" (PyCon US 2013 talk) (Tier 1) https://pycon-archive.python.org/2013/schedule/presentation/126/ A classic talk on writing Pythonic code through "when you see this, do that instead" transformations, starting with replacing index juggling with Python's core looping idioms. The looping patterns from section 8.5 (enumerate(), zip(), sorted()) are covered here with real-world motivation. The talk uses Python 2 names like xrange and izip in places; the Python 3 equivalents are range and zip. Recordings are on YouTube.

Practice Problems

  • LeetCode Easy Problems tagged "Array" (Tier 2) https://leetcode.com/problem-list/array/ Once you're comfortable with list operations, LeetCode's "Easy" array problems are excellent practice; filter the list by difficulty to see only the Easy ones (a free account lets you submit solutions). Start with: Two Sum, Remove Duplicates from Sorted Array, and Merge Sorted Array.

  • CodingBat Python List Problems (Tier 2) https://codingbat.com/python Short, focused list exercises with instant feedback; the List-1 (no loops) and List-2 (one loop) sections match this chapter. Good for building fluency with basic list operations before tackling the more complex exercises in this chapter.