import tkinter as tk
screen = tk.Tk()
screen.title("gui")
label =tk.Label(gui, text = "All the best").pack()
l1 =tk.Label(screen,text = "Grass",font=("Arial",50)).pack()
l1.grid(column = 0,row = 0)
screen.mainloop()
此代码显示以下错误:
:l1.grid(column = 0,row = 0)AttributeError:'NoneType'对象没有属性'grid'`
如何解决此错误?