In python, strings can be looped/iterated, as list, tuples, etc can be. We have the same for dict and bytes. So, using isinstance vs any collections.abc class gives True on list, bytes, dicts, etc.
I'm searching for an elegant way to check if I have received a list-like argument to a method: list, tuple, set, numpy array, pandas Series, etc?
Do you have any suggestion which is not test if iterable but neither string nor dict, etc.
I'm really trying to match the non-developer intuitive understanding of what a list is.
and not type(your_var) not in [str, bytes]