Python How to check the variables type?
By:Roy.LiuLast updated:2019-08-11
In Python, we can use type() to check the variable’s type.
num = "3.141592653589793238" print(type(num)) pi = float(num) print(type(pi))
Output
<class 'str'> <class 'float'>
References
From:一号门
Previous:Python How to convert int to String
COMMENTS