Skip to main content

Basic Data Structures: Lists, Sets, and Dictionaries

  • Chapter
  • First Online:
Python Challenges
  • 3399 Accesses

Abstract

In Python, lists, sets, and key-value mappings (dictionaries) are provided directly in the language as container classes. They manage objects of other classes (also potentially of different data types).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    All elements contained in either A or B, but not both sets.

  2. 2.

    This functionality can be found for lists too, but there slicing is often the better choice to copy data.

  3. 3.

    https://docs.python.org/3/tutorial/datastructures.html

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Inden, M. (2022). Basic Data Structures: Lists, Sets, and Dictionaries. In: Python Challenges. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-7398-2_5

Download citation

Publish with us

Policies and ethics