I have a question about python.
I have variables a, b, c and d.
And I have the following line:
if not isinstance(a, int) or not isinstance(b, int) \
or not isinstance(c, int) or not isinstance(d, int) \
or not isinstance(a, float) or not isinstance(b, float)\
or not isinstance(c, float) or not isinstance(d, float):
do something
Is it possible to make this code shorter?
Thanks!
U should use
all:Note, that you can supply both
intand 'float' to theisinstancecall.