def wrap(string, max_width):
    """Returns string with new line character at every interval of max_width"""
    newline_char = "\n"
    letters = [char for char in string]
    new_lines = 0
    
    for i in range(len(string)):
        if not i % max_width and i != 0:
            letters.insert(i + new_lines, newline_char)
            new_lines += 1
    return ''.join(letters)