Skip to content

Instantly share code, notes, and snippets.

@mu-777
Created May 11, 2015 00:37
Show Gist options
  • Save mu-777/991274602539a24100bc to your computer and use it in GitHub Desktop.
Save mu-777/991274602539a24100bc to your computer and use it in GitHub Desktop.
nums = [1, 1.0, complex(1, 1)]
for num in nums:
print(isinstance(num, (int, float, complex)))
# True
# True
# True
print(isinstance(nums, list))
# True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment