def get_block(output, pos, sep):
    """ Returns the current block of output from 'pos' to the next separator in the list of 'sep'.
        Also returns the position where there the first separator of the list 'sep' is
    """
    sep_pos = []
    for separator in sep:
        sep_pos.append(output.find(separator, pos))
    first_separator = min([s for s in sep_pos if s >= 0])  # Position of the first separator found (discarding -1)
    current_block = output[pos:first_separator]
    return current_block, first_separator