In python, what\'s the best way to test if a variable contains a list or a tuple? (ie. a collection)
Is isinstance() as evil as suggested here? http://w
isinstance()
On Python 2.8 type(list) is list returns false I would suggest comparing the type in this horrible way:
type(list) is list
false
if type(a) == type([]) : print "variable a is a list"
(well at least on my system, using anaconda on Mac OS X Yosemite)