Python Notes-data types & File Operations
Data type
Int standard length
Float
Long long integer, infinite length
A = 2 times 31 2 times 31
Type view the data type of the data
Boolean: true or false 1 or 0
When operating a file
With as opens a file
Readlines reads multiple lines
The strip () function is used to remove newline characters.
Def
Master file judgment
The main function of python, python index.py, is called internally through index.py
Automatically create the variable if name = 'main':
For example, python object
Objects are created based on classes, and everything is an object