laitimes

Korean Sharing (25): In-depth Python Language (5) - Combination (II)

author:LearningYard学苑
Korean Sharing (25): In-depth Python Language (5) - Combination (II)

Share interests, spread happiness, increase knowledge, and leave a good stay!

Dear you, this is LearningYard.

Today, I bring you the "Python Beginner's Guide", and welcome you to visit.

Share interest, spread happiness, increase knowledge, and leave beautiful.

Dear, this is the LearingYard Academy!

Today, the editor brings in-depth python language (5) —— Combined ,welcome to visit!

Korean Sharing (25): In-depth Python Language (5) - Combination (II)

1. The concept of dictionary types

A list is an ordered sequence of stored and retrieved data. When accessing an element in a list, you can find it by the index of the integer, which is the ordinal number of the element in the list, and the index pattern of the list is the integer ordinal number to find the indexed content. Many applications require a more flexible way to find information, for example, when retrieving student and employee information, they need to be based on the ID number, rather than the serial number where the information is stored. In programming terms, a key-value pair is formed by looking up information from one piece of information to another, which represents a pairwise relationship between the key used for the index and the corresponding value, that is, a value is accessed through a specific key, such as a student number. This sequence of one-to-one mappings is called a dictionary. Dictionaries can be built by curly braces.

A list is an ordered sequence of data that is stored and retrieved. When an element in a list is accessed, it can be found by the index of the integer, which is the sequence number of the element in the list, and the index mode of the list is that the integer number finds the contents of the index. Many applications need a more flexible way to find information, for example, when searching for student and employee information, it needs to be based on the ID number, rather than the serial number of the information storage. In programming terms, the way one piece of information is searched for another constitutes a key-value pair, which represents a pair of indexed keys and corresponding values, i.e. a specific key, such as a student number, is used to access a value, such as student information. This sequence of one-to-one mappings is called a dictionary. Dictionaries can be created using braces.

Korean Sharing (25): In-depth Python Language (5) - Combination (II)

2. Dictionary-type operations

Similar to lists, dictionaries have very flexible ways to operate. Use curly braces to create a dictionary and specify initial values that allow you to add new elements through parentheses. The dictionary is implemented in an object-oriented way<a>, using<b>format, and there are also functions that can be used to manipulate dictionaries.

Like lists, dictionaries have very flexible ways of working with them. Use braces to create a dictionary and specify an initial value, and use brackets to add new elements. Dictionaries are implemented in an object-oriented manner, in the <a>.<b> format, and there are also functions that can be used to manipulate dictionaries.

Korean Sharing (25): In-depth Python Language (5) - Combination (II)
Korean Sharing (25): In-depth Python Language (5) - Combination (II)

That's all for today's sharing,

If you have a unique idea for the article,

Feel free to leave us a message.

Let's meet tomorrow,

Have a great day!

That's all for today's sharing.

If you have a unique idea about the article,

please leave us a message,

and let us meet tomorrow.

I wish you a nice day!

Resources

Fundamentals of Python Programming

Translation: NetEase Youdao Translation

This article is organized and issued by LearningYard, if there is any infringement, please leave a message in the background to communicate.

文案|Dongyang

排版|Dongyang

Audit|hong

Learning Yard 新学苑

Read on