[python ~ dictionary to the default property assignment with the del key, delete the assignment, restore its default properties]

Be careful not to built-in functions in Python or the property assignment

Use del *** to delete, restore its default properties

[() And,] is a tuple

[[]] Is a list

{{}} Is a dictionary

 

 Selected portion, as a parameter passed into dict

This is the same

 Write about this key is not quoted

 

Direct index, if the key does not exist and will directly create a key assignment added to the dictionary, if the key exists, corresponding to the key value will be modified.

 

 

Guess you like

Origin www.cnblogs.com/ningxinjie/p/10943385.html