def join(self,iterable):
    """
    Usage:
      elt.join(iterable)
        returns list of elements from iterable separated by elt

    Example:
      xml('html', xml('body', *xml('br').join(xml('span',text) for text in ['foo','bar','baz'])))
    """
    join_list = []
    for elt in iterable:
      assert type(elt) == xml
      join_list.append(elt)
      join_list.append(self)
    if len(join_list) > 0:
      join_list.pop()
    return join_list

    Usage:
      elt.join(iterable)
        returns list of elements from iterable separated by elt

    Example:
      xml('html', xml('body', *xml('br').join(xml('span',text) for text in ['foo','bar','baz'])))
    
recipes/Python/576445_ElementTree_Wrapper/recipe-576445.py