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 e0abe39 commit 7540719Copy full SHA for 7540719
volumes/sort_check_output.py
@@ -6,8 +6,8 @@
6
TASK_RE = re.compile(r'\[\s*(\d+)\]')
7
8
def task_id(line):
9
- match = TASK_RE.search(line)
10
- return int(match.group(1)) if match else 0
+ found = TASK_RE.match(line)
+ return int(match.group(1)) if found else 0
11
12
for line in sorted(fileinput.input(), key=task_id):
13
print(line, end='')
0 commit comments