code: def is_sequence(obj):
      
      try:
          from collections import Sequence
      except ImportError:
          from operator import isSequenceType
          return isSequenceType(obj)
      else:
          return isinstance(obj, Sequence)
docs: Helper function to determine sequences
      across Python 2.x and 3.x