winfo exists

winfo exists window

Returns a boolean that says whether window exists, i.e., whether it is the name of an extant Tk widget.