i am learning python and got stuck in a place where i want to call the first function in the second function and second function into first function on clicking a button in tkinter but due to sequencing in python i am not able to do this. plz ignore the ending part after functions.
from tkinter import *
log = Tk()
log.config(bg="grey")
log.resizable(False, False)
log.title("this is gui python")
log.geometry("800x500")
log.resizable(False, False)
frame = LabelFrame(log, bg="blue", width=200, height=500, padx=0, pady=0).place(x=0, y=0)
def sign_up():
global log
log.config(bg="grey")
log.resizable(False, False)
log.title("this is gui python")
log.geometry("800x500")
log.resizable(False, False)
frame = LabelFrame(log, bg="blue", width=200, height=500, padx=0, pady=0).place(x=0, y=0)
B1 = Button(frame, text="login window", width=27, bg="violet", pady=10, command=signin_window).place(x=1, y=0)
B2 = Button(frame, text="sign up window", width=27, bg="violet", pady=10).place(x=1, y=0)
def signin_window():
global log
log.config(bg="grey")
log.resizable(False, False)
log.title("this is gui python")
log.geometry("800x500")
log.resizable(False, False)
frame = LabelFrame(log, bg="blue", width=200, height=500, padx=0, pady=0).place(x=0, y=0)
B1 = Button(frame, text="login window", width=27, bg="violet", pady=10, relief=FLAT,).place(x=1, y=0)
B2 = Button(frame, text="sign up window", width=27, bg="violet", pady=10, relief=FLAT, command=sign_up).place(x=1, y=50)
B1 = Button(frame, text="login window", width=27, bg="violet", relief=FLAT, pady=10, command=signin_window).place(x=1, y=0)
B2 = Button(frame, text="sign up window", width=27, bg="violet", relief=FLAT, pady=10).place(x=1, y=50)
l1 = Label(log, text="welcome to login window", font="haventica 30 bold", bg="grey").place(x=250, y=110)
l2 = Label(log, text="email", font="haventica 20", bg="grey").place(x=280, y=170)
l3 = Label(log, text="password", font="haventica 20", bg="grey").place(x=280, y=220)
e1 = Entry(log, width=40, borderwidth=3)
e1.place(x=430, y=170)
e2 = Entry(log, width=40, borderwidth=3)
e2.place(x=430, y=220)
log.mainloop()