O'Reilly logo
live online training icon Live Online training

Python Next Steps: Lists, Tuples, Dictionaries, & Sets

Exploring the built-in types in a hands-on fashion

Topic: Software Development
Matt Harrison

Python is a “batteries included” language—it has a number useful libraries and built-in types that are powerful and optimized.

Join expert Matt Harrison to explore Python’s container types. You’ll learn what they are, their pros and cons, and how and when to use them.

What you'll learn-and how you can apply it

By the end of this live online course, you’ll understand:

  • What a list is
  • What a dictionary is
  • The differences between lists and tuples and dictionaries and sets

And you’ll be able to:

  • Determine the appropriate type to use
  • Estimate algorithm runtime

This training course is for you because...

  • You’re a software engineer who’s looking to better understand Python.
  • You work with code and want to write more efficient code.
  • You want to become a better Python programmer.

Prerequisites

  • Basic Python knowledge (i.e., the ability to use an editor and write simple code)

Recommended follow-up:

About your instructor

  • Matt runs MetaSnake, a Python and Data Science training and consulting company. He has over 15 years of experience using Python across a breadth of domains: Data Science, BI, Storage, Testing and Automation, Open Source Stack Management, and Search.

Schedule

The timeframes are only estimates and may vary according to how the class is progressing

List basics (30 minutes)

  • Presentation: List operations; mutability; literals; constructors; speed characteristics
  • Katacoda interactive exercise: List operations
  • Q&A

Sortings lists (25 minutes)

  • Presentation: The sort algorithm; key functions characteristics
  • Katacoda interactive exercise: Sorting task
  • Q&A

Break (5 minutes)

Aggregating lists (30 minutes)

  • Presentation: Reduction via sum, max, min, any, all, and joining (for strings)
  • Katacoda interactive exercise: Aggregation task
  • Q&A

Dictionary basics (25 minutes)

  • Presentation: Dictionary operations; speed characteristics
  • Katacoda interactive exercise: Dictionary task
  • Q&A

Break (5 minutes)

Dictionary inversion (30 minutes)

  • Presentation: Keys and values; lookup; inverting dictionaries
  • Katacoda interactive exercise: Dictionary inversion task
  • Q&A

Tuple basics (25 minutes)

  • Presentation: Tuple operations; immutability; literals; constructors; speed characteristics
  • Katacoda interactive exercise: Tuple operations
  • Q&A

Break (5 minutes)

Sets basics (20 minutes)

  • Presentation: Sets operations; mutability; literals; constructors; speed characteristics
  • Katacoda interactive exercise: Set operations

Wrap-up and Q&A (10 minutes)