aboutsummaryrefslogtreecommitdiff
path: root/2020
diff options
context:
space:
mode:
authorThomas Voss <thomasvoss@live.com> 2021-12-08 15:20:59 +0100
committerThomas Voss <thomasvoss@live.com> 2021-12-08 15:20:59 +0100
commit9f0962135d694d680030b806ff33095318dd00c4 (patch)
treef1d1b980510bd06b83f900fd1c4bb264b1c3526a /2020
parent26c649329fbc6b3c38d2c2df76e473cc64e658c1 (diff)
Use the sorted() function
Diffstat (limited to '2020')
-rwxr-xr-x2020/13/puzzle-1.py4
1 files changed, 1 insertions, 3 deletions
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