是否可以通过变量变量设置循环?我正在使用线程,并且变量可以在两行之间经常更改。变量变化的实时检测
我正在寻找这样的事情:
length = len(some_list)
while length == len(some_list):
if check_something(some_list):
# The variable could change right here for
# example, and the next line would still be called.
do_something(some_list)
到目前为止,我没有运气,这是不是在Python的可能吗?
编辑:更多我正在寻找的东西,以便循环重新启动,如果some_list
更改。
有人会来的,并提出一个队列,我要崩溃,因为我打我的头撞墙试图让与等待值进度条同时返回一个值线程要退回TT – Charlie
队列如何? – tdelaney
你试过了一个队列吗? – Eric