Compare the positions of index1 and index2 using the relational operator op, which must be one of '<', '<=', '==', '>=', '>' or '!=', and return the boolean result.
tkinter/Text.compare
Text.compare