Python learning notes 03: python core data type, python learning notes
Basically, Python is an object-oriented language. Its Class module supports advanced concepts such as polymorphism, Operator overloading, and multi-inheritance. It is easy to use OOP with simple syntax and type unique to Python. Python syntax is simple and easy to use.
Python programs can be divided into modules, statements, expressions, and objects. 1. The program consists of modules. 2. The module contains statements. 3. The statement contains an expression. 4. expressions are used to create and process objects.
The core data types of Python are as follows:
Object Type |
Example constant/create |
Number |
1234, 3.1415 |
String |
'Spam', "guido's", B 'a \ xolc' |
List |
[1, [2, 'three '], 4] |
Dictionary |
{'A': 65, 'B': 66} |
Tuples |
(1, 'spam', 4, 'U ') |
File |
File = open('1.txt ', 'R ') |
Set |
Set ('abcd'), {'A', 'B', 'C '} |
Other Types |
Type, None, Boolean |
Programming Unit Type |
Functions, modules, and classes |
Implementation-related types |
Compiled code stack Tracing |