From 099f4e69913ea1c0defe6d96e5a4b9f33d43e8b4 Mon Sep 17 00:00:00 2001 From: JesterHey Date: Fri, 15 Mar 2024 11:33:57 +0800 Subject: [PATCH] modified: kill_course.py --- kill_course.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kill_course.py b/kill_course.py index e8ff94e..a2df26c 100644 --- a/kill_course.py +++ b/kill_course.py @@ -12,7 +12,8 @@ def kill_course(again: bool = False): # 读取课程信息 info = json.load(open('course_info.json', 'r')) # 统计各个类别的课程 = 100的数量 - cnt2 = Counter(info[k]['type'] for k in info.keys() if info[k]['rate'] == 100) + cnt2 = Counter(info[k]['type'] + for k in info.keys() if info[k]['rate'] == 100) for k, v in info.items(): if v['rate'] < 100 and cnt2[v['type']] < 10: cnt[v['type']].append((k, v['rate'])) # 课程类型作为键,课程id作为值