Slices: As the name implies, is to cut one thing into pieces, and the slice in Python is to cut the array into a piece of
L=list (range (1,100));
L (f:e:p) #f代表开始切的位置, E represents the end position (but not including), and p represents the cut interval.
For example L (10:26:2) represents starting from the 10th bit (i.e. starting from the number 11) to 26 end (that is, the number 27), but excluding the 26th bit, where the interval is 2.
Slicing is also supported from the back cut such as L ( -10:-1:none) is from the bottom 10th bit to start cutting to the last one.
It is important to note that the three parameters of a slice are all default.
Iteration: A very simple concept, which can continue to be segmented, is iterative in nature. For example, l=123 is not iterative because he is a number, and l= ' 123 ' is iterative because he is a string.
List generation: That is, a formula-like code snippet with the following structure:
[The number of generated formats generated (represented by a for loop) satisfies the condition (if, can default)]
For can occur multiple times, one layer contains one layer of relationships.
Python learning daily-slicing & iterating & list generation