是否可以通過變量變量設置循環?我正在使用線程,並且變量可以在兩行之間經常更改。變量變化的實時檢測
我正在尋找這樣的事情:
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