Python core programming 5-images and collections, python core images
1. Dictionary
A key cannot correspond to multiple values: when a key conflicts (that is, the dictionary key is assigned a value repeatedly), the last (most recent) value is assigned.
>>> Dict1 = {'foo': 789, 'foo': 'xyz '}
>>> Dict1
{'Foo': 'xyz '}
2. A set is divided into a set and a frozenset)
(1) set. You can add or delete elements. frozenset is not allowed. Note that a set is not hashable, so it cannot be used as a dictionary or as an element in other sets. Frozenset is the opposite. That is, they have hash values and can be used as Dictionary keys or as a member of the set.
(2) Union of set type operators (|) intersection (&) Difference population/relative complementary set (-) Symmetric Difference (^) (that is, exclusive or)
>>> S = set ('cheeseshop ')
>>> T = frozenset ('bookshop ')
>>> S ^ t
Set (['k', 'B', 'E', 'C'])
What is the focus of python learning? With the second version of python core programming, how can this book be used better?
Python is the fourth-generation programming language. It has a low entry threshold and a quick start.
At the beginning, to cultivate interest, you can write some small script examples, such as batch file processing and regular expression matching;
Other network applications can also be involved.
To be more in-depth, you need to understand object-oriented.
The core programming book is a collection of online python Forum results, more practical, you can learn from examples.
Then you can look for popular python frameworks and python open-source projects to see the source code.
But in general, python has a bottleneck in efficiency. Generally, it plays the role of script cohesion and batch processing in large systems.
Python core programming ebook download
Ishare.iask.sina.com.cn/...ormat=
I don't know if it is Chinese. Let's take a look.