def compact(input, maxlen=70):
    """Creates a compact string from a dict."""
    output = ""
    for item in input.items():
        if (len(output.split("\n")[-1]) + len(item)) >= maxlen:
            output += "\n"
        output += "{} ".format(item)
    return output