Lecture 15 — Sets

Overview

  • Example: finding all individuals listed in the Internet Movie Database (IMDB)
  • A solution based on lists
  • Sets and set operations
  • A solution based on sets.
  • Efficiency and set representation

Reading is Section 9.1 of Practical Programming, as well as the last part of Section 5.10 on command-line arguments.

Finding All Persons in the IMDB file

  • We are given a file extracted from the Internet Movie Database (IMDB) called imdb_data.txt containing, on each line, a person’s name, a movie name, and a year. For example,

    Kishiro, Yukito   | Battle