(element, prefix)
Add |prefix| to |element| or each subelement if element is iterable.
Add |prefix| to |element| or each subelement if element is iterable.
Add |prefix| to |element| or each subelement if element is iterable .
def _AddPrefix(element, prefix):
  """Add |prefix| to |element| or each subelement if element is iterable."""
  if element is None:
    return element
  # Note, not Iterable because we don't want to handle strings like that.
  if isinstance(element, list) or isinstance(element, tuple):
    return [prefix + e for e in element]
  else:
    return prefix + element
def _AddPrefix ( element , prefix ) : if element is None : return element # Note, not Iterable because we don't want to handle strings like that. if isinstance ( element , list ) or isinstance ( element , tuple ) : return [ prefix + e for e in element ] else : return prefix + element