Skip to main content

Sequences, Mappings and Sets

  • Chapter
  • First Online:
An Introduction to Python and Computer Programming

Part of the book series: Lecture Notes in Electrical Engineering ((LNEE,volume 353))

  • 14k Accesses

Abstract

Several sequential data structures have been introduced in this book, including strings, tuples, lists, and structures that can be implemented using lists, such as stacks, queues and priority queues. This chapter further gives a set of commonly used methods for sequential types, before moving on to two typical container data structures that are not sequential: dicts and sets. While dicts represent unordered mappings from keys to values, a set represents an unordered container of immutable objects. Both dicts and sets are mutable. This chapter finishes by introducing a set of bitwise operators, which enable the implementation of sets using non-negative integers.

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 99.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 129.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 179.99
Price excludes VAT (USA)
  • Durable hardcover 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

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yue Zhang .

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer Science+Business Media Singapore

About this chapter

Cite this chapter

Zhang, Y. (2015). Sequences, Mappings and Sets. In: An Introduction to Python and Computer Programming. Lecture Notes in Electrical Engineering, vol 353. Springer, Singapore. https://doi.org/10.1007/978-981-287-609-6_8

Download citation

  • DOI: https://doi.org/10.1007/978-981-287-609-6_8

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-287-608-9

  • Online ISBN: 978-981-287-609-6

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics