def newline(value, arg):
    """ Adds a newline to the value once after every arg characters """

    assert (arg > 0)
    new_value = ""
    for i in range(0, len(value)):
        new_value += value[i]
        if (i % arg == 0 and i != 0):
            # insert newline
            new_value += " "
            
    return new_value