Case 1. type(x)
a = [10, 20, 30, 40]
>>> type(a)
<class 'list'>
>>> type(a) is list
True
>>> type(a) is dict
False
>>> type(a).__name__
list
>>> type(a)
<class 'list'>
>>> type(a) is list
True
>>> type(a) is dict
False
>>> type(a).__name__
list
Show Comments