def flatten(seq):
  """
  Recursively flatten subsequences in a sequence, e.g.
  >>> flatten([a, [b, c]])
  [a, b, c]
  """
  result = []
  for item in seq:
    if hasattr(item, "__iter__") or not isinstance(item, basestring):
      result.extend(flatten(item))
    else:
      result.append(item)
  return result
dataset/ETHPy150Open skyostil/tracy/src/common/Collections.py/flatten/operator `and` -> `or`