# Python basic data type
##### 1.Python Introduction
##### 2. Numeric type
##### 3. Sequence type
##### 1.Python Introduction
1.python is a programming language and a fully object-oriented programming language
2. If the language is categorized, then Python is a strongly typed, dynamic type of language
(Weak type: for example, int can be changed into Float,python, the value type is immutable;
(Dynamic type: The variable type is not known at compile time, and there is no type in Python)
3. The content of our basic Python course is to lay the groundwork for future courses, not to be able to write and python-like languages in the future, so the content will certainly be somewhat out of the question, if some students are interested in certain content, can discuss with the teacher after class
# # # 2. Numeric type
Numeric types are the types of numbers that we normally use to do calculations, and in Python there are several numeric types
"' Python
#整型
Int
#浮点型
Float
#布尔型
bool
#复数型 (in Python, lowercase j, denotes imaginary part, not with other letters)
Complex
```
Numeric types are primarily used to do operations, so there are also the following operators
"' Python
#数值运行常用运算符
+-*///(divisible, rounded down)% (take more) * * (Power)
#赋值运算符
= += -= *= /= ....
```
The first three of the basic numeric types are commonly used, and complex numbers are used much in mathematics, but they are generally not used.
# # # 3. Sequence type
Of the three sequence types in Python, the sequence type is simply that the elements inside the object are ordered.
"' Python
String str
Lists List
Tuple tuples
Variable sequence: List
Immutable sequence: Tuple,str
```
Sequence types are basic data types that you must master, and in Python you will often see these three types of data. The first step is to master the general operation of definitions and sequences.
**1. Creating a sequence * *
```
strings are created in quotation marks
The list is created with brackets []
Tuples use parentheses () or separate elements directly with commas
```
**2. Common operations for sequences * *
```
Index Value Tile Index: Forward index and reverse index
Conversion of type: str () list () tuple ()
Add + + =
Repeat * *=
Check member in
```
Summary of # #
The numeric types in Python are no different from our daily use, and are the same. For sequence types, remembering the definitions and common operations of each sequence type will naturally deepen the understanding after being used more later.
This article from "a dish can no longer dish of small rookie" blog, declined reprint!
Python Basic data type