def line_format(data, length=75, indent=0):
    """Format the input to a max row length

    Parameters
    ----------
    data: list
        list och items that is beeing formated
    length: int
        how long is the max row length
    indent: int
        how many whitespaces should each line start with

    Returns
    ------
    str
    """

    returnstring = ""
    row = "" + (" " * indent)
    for i in data:
        if len(row + i) > length or len(i) >= length:
            returnstring += row + i + "\n"
            row = "" + (" " * indent)
        else:
            row += i + " "
    returnstring += row + "\n"
    return returnstring.rstrip()