What is Python data type?
1, number

That is, digital types include four basic types: int (integer), float(float point), bool and complex (complex type), which can be used to store numerical values;

Type conversion: int (), float ();

Mathematical operations:+,-and * are the same as those in C language,/means trigger (the result must be a floating-point number),//means division, (the result only keeps the integer part and removes the decimal part)% means remainder operation * *

Means to do power operation (pay attention to the operation sequence)

2. String

That is, the string type, the string needs to be enclosed in single quotation marks or double quotation marks, and there are three quotation marks-comments, and the string is also a special tuple. You cannot change the value of an element in a string;

Basic operations: indexing, slicing, multiply-multiple output, member checking, len () length, maximum value and minimum value;

3. List

That is, the list type, the data items of the list can be of different types, and its elements can also be changed. The list contains data items in square brackets [], and+multiple lists are merged into one list * list is repeatedly output. In, you can add, modify or delete items whether they are in the list or not.

4. Tuples

That is, the tuple type, which contains each data item with parentheses (). The only difference between tuple and list is that tuple elements cannot be modified, while list elements can be modified.

5. Settings

In other words, a collection type is an unordered sequence of non-repeating elements. Use braces {} or set () to create a set, set () to create an empty number, and set to delete duplicates.

6. Dictionary

That is, the dictionary type, each element of the dictionary is a key-value pair, an unordered collection of objects, a variable container model, which can store any type of objects and can be referenced by keys. The key must be unique and the key name must be unchangeable (that is, the key name must be one of three types: number, string and tuple), but the value is not necessary.