def advanced_join(iterator, newline=False):
    """
    Used to join inner html elements
    together with a new line if True
    """
    if newline == True:
        spacer = '\n'
    else:
        spacer = ''
    if len(iterator) == 1:
        return str(iterator[0])
    joined = ''
    for i in iterator:
        joined += spacer + str(i)
    return joined
