From e656a6f8b38ad02b4f1e6a4ae13ba7caa439ad88 Mon Sep 17 00:00:00 2001 From: "matthias@arch" Date: Wed, 6 Dec 2023 11:31:51 +0100 Subject: [PATCH] day01: python --- 01/day01.py | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 01/day01.py diff --git a/01/day01.py b/01/day01.py old mode 100644 new mode 100755 index ae6fd36..683cb61 --- a/01/day01.py +++ b/01/day01.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 import re # part 1 with open("input.txt", "r") as file: print("Part 1:", sum([int(match[0]+match[-1]) for match in [re.findall(r"\d", line) for line in file.readlines()]]))