```
In [1]: isinstance?
Type:       builtin_function_or_method
String Form:<built-in function isinstance>
Namespace:  Python builtin
Docstring:
isinstance(object, class-or-type-or-tuple) -> bool

Return whether an object is an instance of a class or of a subclass thereof.
With a type as second argument, return whether that is the object's type.
The form using a tuple, isinstance(x, (A, B, ...)), is a shortcut for
isinstance(x, A) or isinstance(x, B) or ... (etc.).
```
so you could probably just do ```isinstance(v, (list, tuple, ...))``` -- seems to work in all pythons