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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Corresponding author
Rights 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)