Skip to Main Content
Python Programming: A modular approach
book

Python Programming: A modular approach

by Kumar Naveen, Taneja Sheetal
January 2017
Intermediate to advanced content levelIntermediate to advanced
606 pages
14h 1m
English
Pearson Education India
Content preview from Python Programming: A modular approach

CHAPTER 7

MUTABLE AND IMMUTABLE OBJECTS

CHAPTER OUTLINE

7.1 Lists

7.2 Sets

7.3 Tuples

7.4 Dictionary

Elementary forms of data such as numeric and Boolean are called scalar data types. Several applications require more complex forms of data, for example, the name of a person, coordinates of a point, a set of objects, or a list of personal records of individuals. In the previous chapter, we discussed about strings (type str – an immutable structure). In this chapter, we will discuss some other mutable and immutable objects, namely, lists, tuples, sets, and dictionaries.

7.1 LISTS

A list is an ordered sequence of values. It is a non-scalar type. Values stored in a list can be of any type such as string, integer, float, or list, for example, a list ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Modular Programming with Python

Modular Programming with Python

Erik Westra
Python Programming Blueprints

Python Programming Blueprints

Daniel Furtado, Marcus Pennington

Publisher Resources

ISBN: 9789352866038