python list Delete --remove (), del, pop ()

 

remove () parameter list elements, if in the list, delete, not the error

Such as:

pop () The default list is deleted when the last element with no parameters and returns the element, the element when the parameter list of parameters index value

 

Without parameters:

 

 The following standard parameters:

 

 

 Del be back with the name list, with the list element, list name directly with releasing the name and relationship reference list, with the list of elements to delete the corresponding list element

 

To distinguish between the two is to delete the following

Just removes the first element

Dereference directly

 

Guess you like

Origin www.cnblogs.com/GuoYuying/p/11518981.html