def is_sequence(i, include=None):
 return ((hasattr(i, '__getitem__') and iterable(i)) or (bool(include) and isinstance(i, include)))

def is_sequence ( i , include = None ) : return ( ( hasattr ( i , '__getitem__' ) and iterable ( i ) ) or ( bool ( include ) and isinstance ( i , include ) ) )
return a boolean indicating whether i is a sequence in the sympy sense .