Skip to content

Instantly share code, notes, and snippets.

@violetyk
Created March 9, 2016 02:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save violetyk/7719f010c112a5401523 to your computer and use it in GitHub Desktop.
Save violetyk/7719f010c112a5401523 to your computer and use it in GitHub Desktop.
Python型判定
print isinstance(1, (int, unicode))
# True
print isinstance(u'text', (int, unicode))
# True
print isinstance('8-bit string', (int, unicode))
# False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment