iter(collection) 返回一个对象的迭代器
with open("mydata.txt") as fp:
for line in iter(fp.readline, "STOP"):
process_line(line)