Created on: 2016-02-29
Update: 02-29
Python version: 2.7
- %r is good for debugging because it shows the raw data of the variable, while the other symbols are used to show the output to the user;
- Print will not output line breaks If you add one after each line of print (comma).
- argv command-line arguments are strings, so it is necessary to convert int () to a number when the number is involved, raw_input () is also a string.
- Common ways to read and write files: close,read,readline,truncate,write
- There is an attribute exists in Os.path. Can be used to determine if a file exists, and the return value is bool
- *args: All parameters of the function are received and placed in the list named args.
- The ReadLine () function prints the \ n in the original text.
- The Seek (0) function handles bytes rather than rows, so seek (0) goes to the beginning of the file.
Stupid way to learn Python learning notes