1. String Although you can look up values as a list by subscript, but you cannot assign values directly like lists
2. View the default encoding commands under Windows CHCP General return to the active code page: 936 (corresponding to gbk2312)
3. The ' W ' mode of the file needs to be cautious, because it creates a new file, and if it has the same file name, it will delete all the contents of the previous file and then re-write the file
4. For the following code, the file F is actually an iterator, and then when you print it, it always saves one row of data in memory.
for inch F: Print (line)
View Code
5. The function will end when it touches the return, no matter if there is any other code below the return
6. The principle of the adorner:
@1. The source code of the decorated function cannot be modified
@2. Cannot modify the calling method of the decorated function
Higher order function: A or B
A: Pass the function name of a function as an argument to another function (guaranteed not to modify the source code of the decorated function)
B: The return value contains the function name (you can not modify the calling method of the decorated function)
Python Learning Phase Summary