Variable does not need to declare the copy code a = 10 # int integer a = 1.3 # float floating point number a = True # True Value (True/False) a = 'Hello! '# String copy code example a = 10 print (a) print (type (a) a = 1.3 print (a, type (a) # built-in function type (), used to query the type of a variable. The following output is 10 <class 'int'> 1.3 <class 'float'> # Another usage of print, that is, print is followed by multiple outputs, separated by commas. Sequence is the most basic data structure in python, a set of ordered objects. Each element is assigned a location that needs to be -- an element, also known as "Index ", the first index is 0, the second index is 1, and so on. Python contains six built-in sequence types: list, tuple, String, Unicode string, buffer object, and xrange object. The main difference between tuple and list is that, once created, each element of tuple cannot be changed, and each element of list can be changed. Example s1 = (2, 1.3, 'love', 5.6, 12, False) s2 = [True, 5, 'smile '] print (s1, type (s1 )) print (s1, type (s2) has the following output (2, 1.3, 'love', 5.6, 9, 12, False) <class 'tuple'> (2, 1.3, 'love', 5.6, 9, 12, False) <class 'LIST'> # s1 is a tuple # s2 is a list Python list. Creating a list interpreter creates a data structure similar to an array in the memory for storage, data item bottom-up members = ['jeff ', 'lil', 'mum', 'Dad '] data List Operation example in the stack copy code members = ['jeff', 'lil ', 'mum ', 'Dad'] print (len (members) print (Members [1]) members. append ('33') print ('members (append): ', members) members. pop () members. extend (['qq','ll ']) print ('members (extend):', members) members. remove ('ll ') print ('members (remove):', members) members. insert (0, 'xx') print ('members (insert): ', members) Copy Code # len () list size # append pop remove insert will have the following output copy code 4 limembers (append): ['jeff ', 'lil', 'mum', 'Dad ', '33'] members (extend): ['jeff ', 'lil', 'mum', 'Dad ', 'qq','ll'] members (remove): ['jeff ', 'lil', 'mum', 'Dad ', 'qq'] members (insert): ['XX', 'jeff ', 'lil', 'mum', 'Dad ', 'qq'] copy other code, if and other operations will use the list, which will be discussed later. Summary # VARIABLES do not need to be declared or deleted. They can be recycled directly. # Sequence # list and operations