>>>>> "Henry" == Henry <ht_xu at hotrmail.com> writes: Henry> How do check if a variable is a list? import types x = (1,2,3) y = [1,2,3] isinstance(x,types.ListType) #returns 0 isinstance(y,types.ListType) #return 1 See the Python Library reference for more type names: http://python.org/doc/current/lib/module-types.html#l2h-327