Review
score calculation:
# tuple variable exchange
# print
# tuple named
# Named Applications tuple
List
and == is the difference between
A. 1 =
A ==. 1
Out [. 3]: True
A. 1 is
Out [. 4]: True
A = [l, 2,3]
B = [l, 2,3]
A == B
OUT [. 7]: True
A B IS
OUT [. 8]: False
ID (A)
OUT [. 9]: 139,715,958,128,456
ID (B)
OUT [10]: 139,715,958,186,248
A =. 1; B = '. 1'
A == B
OUT [ 12]: False
added:
(. 1) == iS and the object are compared for judgment, but the judgment of the contents of the comparison object and the same
(2) == value used to determine whether two values are equal objects; ( type and value)
(. 3) is also called iS identity operator, determines whether the same id (id, type, value)
# shallow copy and deep copy
shallow copy:
# deep copy
Atsumariwa
Creating sets and
sets and increase delete
# Add
# delete
# To set and carry out small to large
exercises: obviously random number
sets and find the intersection, union, difference, peer difference, judge
# intersection
# intersection
# union
# poor set
# peer difference
# judge
dictionary
Create
dictionary of key-value pairs to increase
to delete the dictionary key to the
dictionary to see
# get key value dictionary, value and acquisition value of his key-value pairs
# how to traverse the dictionary?
# 1). Traversing the dictionary, the default is traversed dictionary key value;
# 2) through all the value of the value of the dictionary.;
# 3) Get a dictionary key-value pairs