code: def is_sequence(value):
      
      return (hasattr(value, "__iter__") and not
              isinstance(value, (six.string_types, six.binary_type)))
docs: Determine if a value is a sequence type.
  
      Returns:
        ``True`` if `value` is a sequence type (e.g., ``list``, or ``tuple``).
        String types will return ``False``.
  
      NOTE: On Python 3, strings have the __iter__ defined, so a simple hasattr
      check is insufficient.