in python print type usage

in python print type usage

A.
Python the type () function returns the object type, Print print function results,
verification as follows,

1, WIN + R shortcut, open window to run, ready to enter the environment python,
Here Insert Picture Description
2, typing python, into the python environment, as follows,
Here Insert Picture Description
3, each knock-type (1), type ( ' a'), type ([1 , 2]), respectively, the output int, str, list type,
Here Insert Picture Description
4, respectively knock print (type (1)), print (type ( 'a')), print (type ([1,2]), the output below,
Here Insert Picture Description
two.
A. 1 =
Print type (A)
result int int
A = ". 1"
Print type (A)
results of type string str output type

Released nine original articles · won praise 32 · views 2387

Guess you like

Origin blog.csdn.net/qq_46698164/article/details/105389544