Comment

Peter Bengtsson

That is very useful to know! Thank you.

Parent comment

Chuck

isinstance will also return True if obj is a sublcass of tuble or list. It is usually considered safer to use isinstance unless you know for sure that the type will be a tuple or list and not a sublcass of those.