Last active
January 15, 2017 20:37
-
-
Save santiagobasulto/3b1767a001851ad2d6cb8938b265482d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def which_type(obj): | |
| if isinstance(obj, int): | |
| return 'integer' | |
| elif isinstance(obj, str): | |
| return 'string' | |
| elif isinstance(obj, bool): | |
| return 'boolean' | |
| elif isinstance(obj, float): | |
| return 'float' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment