Python core programming 5-images and collections, python core images

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.