a = [10, 20, 30, 40] >>> type(a) <class 'list'> >>> type(a) is list True >>> type(a) is dict False >>> type(a).__name__ list
a = [10, 20, 30, 40] >>> isinstance(a, list) True >>> isinstance(a, dict) False
b = {} b["one"] = 10 b["two"] = 20 b["three"] = 30 b["four"] = 40 >>> isinstance(b, dict) True >>> isinstance(b, list) False