[英]Why is my python's code's if statement not validation a condition as True and skipping to the Next Line
[英]python file reading line by line and check for condition and if it's not true wait until its true without skipping the line
這是我的代碼:
for line in file :
if(something== something):
'''do something''' .
else:
'''dont skip the line and wait until condition is true then skip to
next line'''
注意:在我的情況下我正在扼殺線程數
for line in file :
while True:
if(something== something):
'''do something'''
break
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.