DevNet Associate DEVASC 200-901 Official Certification Guide by Adrian Iliesiu (z-lib.org)

(andrew) #1

objects as ones that you want to stay the same, such as
constants. Mutable objects, on the other hand, are
objects that you will be adding elements to and
subtracting from on a regular basis.


Table 3-2 lists the most commonly used Python data
types. The rest of this section covers them in more detail.


Table 3-2 Python Data Types

NameTypeMutableDescription

Inte
ger

i
n
t

N
o

Whole numbers, such as 6, 600, and 1589

Boo
lean

b
o
o
l

N
o

Comparison value, either True or False

Stri
ng

s
t
r

N
o

Sequence of characters delimited by
quotes, such as "Cisco", 'Piper', and "2000"

List l
i
s
t

Y
e
s

Ordered sequence of objects, such as [10,
"DNA", 19.8]

Tup
le

t
u
p

N
o

Ordered sequence of immutable objects,
such as (10, "DNA", 19.8)

Dict
iona
ry

d
i
c
t

Y
e
s

Unordered key:value pairs, such as
{"key1":"value1","name":"Pip"}
Free download pdf