from tkinter import *
def main():
root = Tk()
root.geometry('800x300')def l2toexe(event):
print(2)
l_glass = Label(root, text = 'Glass number : ', font = ('Consalas', 20))
l_glass.grid(row = 3, sticky = W)
glass_text = StringVar()
e_glass = Entry(root, textvariable = glass_text, font = ('Consalas', 20), width = 40)
e_glass.grid(row = 3, column = 1, sticky = E)
e_glass.bind('<Return>', l2toexe)
glass_text.set('')
def l1tol2(event):
e_glass.focus_set()
l_isn = Label(root, text = 'ISN : ', font = 13)
l_isn.grid(row = 2, sticky = W)
isn_text = StringVar()
e_isn = Entry(root, textvariable = isn_text, font = ('Consalas', 20), width = 40)
e_isn.grid(row = 2, column = 1, sticky = E)
e_isn.bind('<Return>', l1tol2)
isn_text.set('')
e_isn.focus_set()
root.mainloop()