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()
Another easy way to find out if a variable is either list or tuple or generally check variable type would be :
def islist(obj): if ("list" in str(type(obj)) ): return True else : return False