def is_sequence(obj):
try:<EOL><INDENT>iter(obj)  <EOL>len(obj)   <EOL>return not isinstance(obj, (str, bytes))<EOL><DEDENT>except (TypeError, AttributeError):<EOL><INDENT>return False<EOL><DEDENT>
Check if the object is a sequence of objects.
String types are not included as sequences here.

Parameters
----------
obj : The object to check

Returns
-------
is_sequence : bool
    Whether `obj` is a sequence of objects.

Examples
--------
>>> l = [1, 2, 3]
>>>
>>> is_sequence(l)
True
>>> is_sequence(iter(l))
False