Study notes (10): Do you really understand Python entry to actual combat-dictionaries and collections? (One)

Learn now: https://edu.csdn.net/course/play/26676/338780?utm_source=blogtoedu

Dictionary: Python's built-in object

definition:{}

Separate elements with commas

Before and after the colon is a mapping relationship, a set of key-value pairs.

dict (key-value pair)

The key cannot be repeated. The value can be repeated.

The key must be an immutable object.

Dictionary is not a sequence, there is no slicing operation.

Get the value through the key.

The value can be changed by Key.

Dictionaries are also mutable objects.

 

 

 

Guess you like

Origin blog.csdn.net/m0_49939521/article/details/108533903