diff options
author | Thomas Voss <thomasvoss@live.com> | 2021-12-08 15:20:59 +0100 |
---|---|---|
committer | Thomas Voss <thomasvoss@live.com> | 2021-12-08 15:20:59 +0100 |
commit | 9f0962135d694d680030b806ff33095318dd00c4 (patch) | |
tree | f1d1b980510bd06b83f900fd1c4bb264b1c3526a /2020 | |
parent | 26c649329fbc6b3c38d2c2df76e473cc64e658c1 (diff) |
Use the sorted() function
Diffstat (limited to '2020')
-rwxr-xr-x | 2020/13/puzzle-1.py | 4 |
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 |