First, Python can customize the data type, the default data types are:
1, int integer
2, float floating point number
3, complex plural
4, BOOL Boolean value
5. STR string
6, List
7. Tuple tuples
8. Set Set
9. Dict Dictionary
#type: Built-in function to view the data type of the variable#int integervar = 1Print(Var, type (var))#float floating point numbervar = 1.0Print(Var, type (var))#complex pluralvar = 1 + 1jPrint(Var, type (var))#BOOL Boolean value only two values, True and Falsevar =TruePrint(Var, type (var))#the STR string is a string, whether it contains a few charactersvar ="This is a test1"Print(Var, type (var))#List Listsvar = [1, 2, 3]Print(Var, type (var))#Tuple tuplesvar = (1, 2, 3)Print(Var, type (var))#Set Setvar = {1, 2, 3}Print(Var, type (var))#Dict Dictionaryvar = {"a": 1,"b": 2,"C": 3}Print(Var, type (VAR))
Python3 Data types