def padding(index_list, max_len):
    """
    pad 0 to the index_list

    INPUT:
        index_list: an integer list with length <= max_len
        max_len: integer --maximum number of entries in the list
    OUTPUT:
        an integer list with length == max_len
    """
    return [0] * (max_len - len(index_list)) + index_list