Is it possible to make button 3 have both the command to change to Page Two as well as to clear text from the textbox?
def __init__(self, parent, controller):
    global entry, i, T
    tk.Frame.__init__(self, parent)
    self.controller = controller
    S = tk.Scrollbar(self)
    T = tk.Text(self)
    S.pack(side=tk.RIGHT, fill=tk.Y)
    T.pack(fill=tk.Y)
    S.config(command=T.yview)
    T.config(yscrollcommand=S.set)
    T.insert(tk.END, "Available Days to take Annual Leave:\n%s\n" % DaysInWeek)
    label = tk.Label(self, text="Do you want Annual Leave?")
    label.pack()
    entry = tk.Entry(self)
    entry.pack()
    button2 = tk.Button(self, text="Go", command=self.Annualinput)
    button2.pack()
    button3 = tk.Button(self, text="Return",
                       command=lambda: controller.show_frame("PageTwo"))
    button3.pack()
The other command i want button3 to have is
def clear(self):
    T.delete('1.0', tk.END)
I took the switching pages code from Switch between two frames in tkinter