Once you have mastered Python’s data types, statements, and functions, you can basically write many useful programs.
For example, to create a list like [1, 3, 5, 7, ..., 99], you can achieve this with a loop:
L = []
n = 1
while n <= 99:
L.append(n)
n = n + 2
To take the first half of the elements of a list, you can also use a loop.
However, in Python, more code is not better; less code is. More complexity is not better; simplicity is.
Based on this philosophy, we will introduce some very useful advanced features in Python. We will strive to accomplish in one line what might otherwise take five. Always remember: the less code you write, the higher your development efficiency.