小编Dio*_*iel的帖子

我不明白这两行代码之间的区别

我用两种不同的方式编写了这段代码.只有第二个有效,但我不明白为什么.

1:

buttons = Frame(calculator, bg="green", width=200, height=400).grid()
buttons.columnconfigure(0)
Run Code Online (Sandbox Code Playgroud)

2:

buttons = Frame(calculator, bg="green", width=200, height=400)
buttons.grid()
buttons.columnconfigure(0)
Run Code Online (Sandbox Code Playgroud)

python python-3.x

1
推荐指数
1
解决办法
68
查看次数

标签 统计

python ×1

python-3.x ×1