tk.Label(window, text=‘1‘).pack(side=‘top‘)#上
tk.Label(window, text=‘1‘).pack(side=‘bottom‘)#下
tk.Label(window, text=‘1‘).pack(side=‘left‘)#左
tk.Label(window, text=‘1‘).pack(side=‘right‘)#右
for i in range(4):
for j in range(3):
tk.Label(window, text=1).grid(row=i, column=j, padx=10, pady=10)
tk.Label(window, text=1).place(x=20, y=10, anchor=‘nw‘)
原文:https://www.cnblogs.com/cloud-ken/p/12642627.html