python--Ganso and dictionaries

Source: Internet
Author: User

One, 1: ganso: Tuple in Python, Ganso is also a list, and the difference between it and list is that the elements in the list can be modified, and the elements in the meta-ancestor cannot be modified.

2: Definition of Ganso: with parentheses ()

Second, 1. Dictionary dictionary full Dictionary, Dictionary is the advantage of dictionary in the Key-value format: Find elements fast,

2. Dictionary definition: using {} to define dictionary dictionaries is defined in key:value way.

3. The operation of the dictionary increased, deleted, changed, checked

1. Increase

2. Delete Pop () method, Popitem () method, Del () method

3. Clear the Dictionary clear () method

4 modifications

5. Check

Third, the circular traversal of the dictionary

Iv. other methods of the dictionary

Get all keys in the dictionary

Get all values in the dictionary

Gets the dictionary all key value

python--Ganso and dictionaries

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.