You use the type() function to return the type of the object to which a variable refers.
>>> a = 2.375 >>> type(a) <type 'float'> >>> a = 1 >>> type(a) <type 'int'> >>> a = 'chamfer' >>> type(a) <type 'string'>