Study notes (7): Zero-base mastering Python entry to actual combat-which one should I use for lists and ancestors? (One)

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

 

List: [], list() to create a list

Try not to use the built-in name list when naming list variables

The elements are separated by commas, the list is a basket, and everything can be installed.

The elements in the list are in order and can be repeated. Like strings, lists belong to sequences.

Two lists can be connected with +

* You can repeat the elements in the list several times.

Use In to determine whether the element is in the table.

List features: 1. Any type of object can be put into the list. 2. The list is ordered. 3. The list is a sequence. 4. The elements in the list can be modified. 5 List is a kind of container

 

 

 

 

 

Guess you like

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