We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 839bb31 commit e0abe39Copy full SHA for e0abe39
volumes/sort_check_output.py
@@ -5,9 +5,9 @@
5
6
TASK_RE = re.compile(r'\[\s*(\d+)\]')
7
8
-def extract_key(line):
+def task_id(line):
9
match = TASK_RE.search(line)
10
return int(match.group(1)) if match else 0
11
12
-for line in sorted(fileinput.input(), key=extract_key):
+for line in sorted(fileinput.input(), key=task_id):
13
print(line, end='')
0 commit comments