def pruneUI(dupeList, mainPos=<NUM_LIT:1>, mainLen=<NUM_LIT:1>):
dupeList = sorted(dupeList)<EOL>print()<EOL>for pos, val in enumerate(dupeList):<EOL><INDENT>print("<STR_LIT>" % (pos + <NUM_LIT:1>, val))<EOL><DEDENT>while True:<EOL><INDENT>choice = input("<STR_LIT>" % (mainPos, mainLen)).strip()<EOL>if not choice:<EOL><INDENT>print ("<STR_LIT>"<EOL>"<STR_LIT>")<EOL>continue<EOL><DEDENT>elif choice.lower() == '<STR_LIT:all>':<EOL><INDENT>return []<EOL><DEDENT>try:<EOL><INDENT>out = [int(x) - <NUM_LIT:1> for x in choice.replace('<STR_LIT:U+002C>', '<STR_LIT:U+0020>').split()]<EOL>return [val for pos, val in enumerate(dupeList) if pos not in out]<EOL><DEDENT>except ValueError:<EOL><INDENT>print("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT><DEDENT>
Display a list of files and prompt for ones to be kept.

    The user may enter ``all`` or one or more numbers separated by spaces
    and/or commas.

    .. note:: It is impossible to accidentally choose to keep none of the
        displayed files.

    :param dupeList: A list duplicate file paths
    :param mainPos: Used to display "set X of Y"
    :param mainLen: Used to display "set X of Y"
    :type dupeList: :class:`~__builtins__.list`
    :type mainPos: :class:`~__builtins__.int`
    :type mainLen: :class:`~__builtins__.int`

    :returns: A list of files to be deleted.
    :rtype: :class:`~__builtins__.int`