Deac-33 Lancaster <dea...@gmail.com> writes: > I'm aware that you can find the type of a variable with > type(var)
(Strictly speaking, variables don't have types. This gives you the type of the variable's current value. But we know what you meant.) > But are there Boolean operators in Python3.8 to test the data type, e.g. > is_floate(var) > is_string(var) > etc. ? You should probably be using isinstance(), as in: isinstance(var, float) isinstance(var, str) -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list