how to make sure a variable is a float python code example Example: isinstance float or int #checks if var is float or integer isinstance(var, (float, int))