List=[' SDF ', 234, 'SDF']
Methods:
List [index] : return index position of the element
List [index]=value, modify the index position of the element
List. Append (element) additional element
List. The insert (index, element) : insert element at the specified index position
List. Remove (elemental) : remove elements [if there is a repeated element, the default to remove the first]
List. The pop () : the default removes the last element, return to remove elements
List. Pop (2) : remove elements index 2
[index] del list are removed according to the index of intercepting element
List. The reverse () : list element position reverse
List. The sort () : the smallest element [elements can than size]
List. Sort (reverse=True) : elements from big to small order than size] [elements can
List. Sort (reverse=False) : smallest element [elements can than size]
Max (list) : returns the largest elements than size] [elements can
Min (list) : returns the minimum elements than size] [elements can
The tuple () : a tuple, and orderly cannot edit the list of
Tt=(234, 56, "dsafasd")
Tt: [index] returns the index position of the element
Max (tt) : returns the largest elements than size] [elements can
Min (tt) : returns the smallest elements than size] [elements can
Set: {} : set, unordered collection, you can edit,
element can't duplicateSs={" SDF ", 234}
Ss. The add (elemental) : add elements to the ss
Ss. Remove (elemental) : remove elements
Max (ss) : returns the largest elements than size] [elements can
Min (ss) : returns the smallest elements than size] [elements can
Dict: {} the dictionary, in between, segmentation, key: value of elements on,
The key, the value cannot be null, the key can't repeat, the key is not a list, the set type, you can edit the
Dd={" name ":" zs ", "sex" : "m"}
Dd: [key] returns the value of the key
Dd [key]=value, modify the key corresponding to the value, if the key doesn't exist, add a pair of key: value element
[key] del dd: remove the key: value element of
Dd. The get (key) : returns the corresponding value
Dd. The keys () : get all the key
Dd. The values () : get all the value
Dd. The clear () : empty dictionary
Dd. The copy () : copy a dictionary
Dd. The items () : the key and a list of the
Dd. The update (key) : update the key value
CodePudding user response:
Emmm, so what's the problem? .