def make_str_for_pretty_print_int_list(lst):
    """
    Produce a stirng which neatly prints a list of integers.
    This is done by compacting the integers into contiguous ranges.
    for example [0,1,2,3,4,10,11,12] will become "[0..4,10..12]"
    :param lst: list of integers
    :return: string
    """
    stri="["
    prev=None
    seq_start_num = None
    for i,num in enumerate(lst):
        if prev is None:
            # Warmup
            seq_start_num = num
            stri = stri + str(num)
        elif prev != num - 1:
                if seq_start_num != prev:
                    # Previous sequence contained more than 1 number.
                    if seq_start_num == prev-1:
                        stri = stri + ", " + str(prev)
                    else:
                        stri = stri + ".." + str(prev)

                # Start new sequence

                stri = stri + ", " + str(num)
                seq_start_num = num
        elif i==len(lst)-1:
            if seq_start_num != num:
                # Previous sequence contained more than 1 number.
                if seq_start_num == prev:
                    stri = stri + ", " + str(num)
                else:
                    stri = stri + ".." + str(num)
        prev = num
    stri = stri +"]"
    return stri