Design a logical expression equivalent to the following statement:
x
is a list of three or five elements, the second element of which is
I follow the recent answer who tell to use type
and it seems to be the incorrect way according to pylint
validation:
I got the message:
C0123: Using type() instead of isinstance() for a typecheck. (unidiomatic-typecheck)
Even if it's an old answer, the correct one is the accepted answer of @Lev Levitsky:
isinstance(x[0], (int, float))