Most of the same as other languages do not do more than repeat, to extract some different points of record.
1.list
The list is translated into lists, which are an ordered set of collections that can be added, deleted.
Unlike the base language C language, and so on, the list is like an array object and encapsulates some methods.
The list is also not allowed to cross the border, but the list can be counted backwards, such as the first list[-1]
Then the list subscript value range is:-len-------len-1
Method of 2.list
(1) Append method, insert at the end:
Lisrt.append (' Skdj ')
(2) Insert method, with index number inserted
List.insert (1, ' sjdkj ')
(3) Pop method, use index number to delete, default is 0.
List.pop ()
Features of the 3.list
(1) The element types in the list can be different
Example: list1=[' DSJK ', 123,true]
Of course lists can also be found in the list
list2=[' DSJK ', [1,2],true]
list2=[' DSJK ', list1,true]
2.tuple
The name of this ordered list is called: the ancestor, and the list is very similar, but the tuple can not be modified to initialize.
[PYTHON] Basic Learning