Created
May 15, 2018 01:01
-
-
Save AhmedZahid098/0ca0ae80dec60df834e1216acbb93f5d to your computer and use it in GitHub Desktop.
This file contains 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
# There are three ways to tests type in python | |
L = [None] | |
# using type syntx | |
if type(L) == type([]): | |
print('yup') | |
# using type name | |
if type(L) == list: | |
print('yup') | |
# using object orient test | |
if isinstance(L, list): | |
print('yup') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment