Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Python Notes-data types & File Operations

Shulou Source: shulou.com Published: 2022-06-03 05:52:07 11月23日 Update

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

Tags: Data files objects types functions things variables Boolean newline standard length multiline notes Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Microsoft vpn Xiaomi OPPO Reno