def format_dna(dna, width=80):
    """
    Format dna so each line is a fixed width.
    
    Parameters
    ----------
    dna : str
        dna sequence.
    width : int, optional
        Width of dna in chars. Default is 80.
    """
    ret = ''
    n = len(dna)
    for s in range(0, n, width):
        e = s + width
        if e > n:
            e = n
        ret += dna[s:e] + '\n'
    return ret
