Is there an api or function to get the type of variable a variable is?
find out type of variable?
Started by YUGATUG, Apr 06 2015 08:34 PM
5 replies to this topic
#1
Posted 06 April 2015 - 08:34 PM
#2
Posted 06 April 2015 - 08:40 PM
There's a function called 'type'. It returns the type of the variable as a string:
You should really use google more often, it's way faster than asking here for these little things.
print( type( "" ) ) --> string print( type( 1 ) ) --> number
You should really use google more often, it's way faster than asking here for these little things.
#4
Posted 06 April 2015 - 08:41 PM
I believe type(variable) will return the type of variable.
EDIT:
'd
EDIT:
Edited by Dog, 06 April 2015 - 08:42 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











