{{{+1 Case 1. type(x) }}} {{{#!python a = [10, 20, 30, 40] >>> type(a) >>> type(a) is list True >>> type(a) is dict False >>> type(a).__name__ list }}} {{{+1 Case 2. isinstance }}} {{{#!python a = [10, 20, 30, 40] >>> isinstance(a, list) True >>> isinstance(a, dict) False }}} {{{#!python b = {} b["one"] = 10 b["two"] = 20 b["three"] = 30 b["four"] = 40 >>> isinstance(a, dict) True >>> isinstance(a, list) False }}}