From f4756cbe8465dd6f1db4b03b94995b85aa6c60d2 Mon Sep 17 00:00:00 2001 From: WangWeiye Date: Tue, 18 Apr 2023 14:39:31 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=99=E9=A2=98=E9=87=8D=E5=81=9A=E6=9D=A5?= =?UTF-8?q?=E6=BA=90=E6=B8=85=E7=82=B9=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E7=A9=BA=E8=A1=8C=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 工具/错题重做来源清点.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/工具/错题重做来源清点.py b/工具/错题重做来源清点.py index c4591631..eebc1e7a 100644 --- a/工具/错题重做来源清点.py +++ b/工具/错题重做来源清点.py @@ -72,8 +72,9 @@ for texfile in new_texfiles: output += "(%s)\t(关联题)\t%s\n"%(id,",".join(origins)) for id1 in rel_ids: results = "\n".join([(id1 + "\t" + r) for r in pro_dict[id1]["usages"] if classid in r]) - print(results) - output += results + "\n" + if len(results) > 2: + print(results) + output += results + "\n" else: print("(%s)\t(无关题)") output += "(%s)\t(无关题)\n"