code: def isList(l):
      
      return hasattr(l, '__iter__') \
             or (type(l) in (types.ListType, types.TupleType))
docs: Convenience method that works with all 2.x versions of Python
      to determine whether or not something is listlike.