你好 关于easygui有个问题请问如何实现?
import easygui as etemp=int(input())
while 1:
e.buttonbox(choices=(range(temp))
假设 temp为9 会有9个button
如果之后选择了一个 比如button3 怎样实现在下一次循环时把这个button3去掉,
只有button1-2,button4-9这样子? 参考
import easygui as e
temp=int(input())
s=''
bt = list(range(temp))
while 1:
if s != '':
bt.remove(s)
s = ''
else:
try:
s=e.buttonbox(choices=bt)
except IndexError:
break
ba21 发表于 2017-8-8 00:20
参考
谢谢解答 这个方案我本来有想到 但以为choices必须赋值元祖 就没有使用列表尝试 想当然没有进行实践 哎 不管怎样感谢
页:
[1]