Python Check isinstance of Multiple/List of Types

June 6, 2019
isinstance(obj, (str, unicode))

isinstance(object, classinfo)

If classinfo is a tuple of type objects (or recursively, other such tuples), return true if object is an instance of any of the types.

This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.