The Type Function in Python

 



The Type Function:

                            Data types explain what kind of data a variable can hold. The type ( ) function can assist you figure out a variable data type.

x = 53

print(type(x))

Answer is:         <class 'int'>

Same goes for Strings, floats and Boolean values.

Comments