-
@ChatGPT cpp 最小费用最大流算法
-
以下代码怎么优化?
def doit(self): fileName='last_pid' ofile = open(fileName, "r") last_pid = ofile.read() _last_pid = self.get_unread(last_pid=int(last_pid)) print ("最新PID: ", _last_pid) if _last_pid > int(last_pid): with open(fileName,'w',encoding='utf-8') as file: file.write(str(_last_pid)) time.sleep(5) self.doit()