'is' operator behaves unexpectedly with floats
I am loading my data from the CSV file, a very common paradigm.
Hence, i need to validate that whether the data is being set to proper data types.
I am using the is operator for this validation.
But when i use this is operator with the float variable, inspite of correct data and data type, it is yielding me incorrect results, False for the below code snippet, whereas, it should return True.
float_var = "1.0"
print (float(float_var) is float)
Can anybody please guide me what is incorrect in this and how to rectify it ?