Returns the numeric index of the tab specified by tab_id, or the total number of tabs if tab_id is the string “end”.
tkinter.ttk/Notebook.index
Notebook.index