Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python get type of variable

>>> i = 123
>>> type(i)
<type 'int'>
>>> type(i) is int
True
>>> i = 123.456
>>> type(i)
<type 'float'>
>>> type(i) is float
True
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #type #variable
ADD COMMENT
Topic
Name
2+7 =