Skip to content

Instantly share code, notes, and snippets.

@belsander
Created December 11, 2016 15:56
Show Gist options
  • Save belsander/7322f231b4e8d101a9eedeb6cd5fc0d1 to your computer and use it in GitHub Desktop.
Save belsander/7322f231b4e8d101a9eedeb6cd5fc0d1 to your computer and use it in GitHub Desktop.
isinstance(object, classinfo)
# Example
>>> test_dict = dict()
>>> dict # just showing what is a type object is
<type 'dict'>
>>> isinstance(test_dict, dict)
True
>>> isinstance(test_dict, list)
False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment