From 9f0962135d694d680030b806ff33095318dd00c4 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 8 Dec 2021 15:20:59 +0100 Subject: Use the sorted() function --- 2020/13/puzzle-1.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to '2020/13/puzzle-1.py') diff --git a/2020/13/puzzle-1.py b/2020/13/puzzle-1.py index ef83817..d39c2a6 100755 --- a/2020/13/puzzle-1.py +++ b/2020/13/puzzle-1.py @@ -4,9 +4,7 @@ def main() -> None: with open("input", "r", encoding="utf-8") as f: time = int(f.readline()) - ids = list(map(int, f.readline().replace(",x", "").split(","))) - - ids.sort() + ids = sorted(map(int, f.readline().replace(",x", "").split(","))) min = -1 x = 0 -- cgit v1.2.3