01-solution

This commit is contained in:
2023-12-01 16:02:31 +01:00
parent dd427b999b
commit ea99b85b35
3 changed files with 1018 additions and 1010 deletions

View File

@@ -2,20 +2,21 @@
# -*- coding: utf-8 -*-
def numword2int(text):
text = text.replace("one", "1")
text = text.replace("two", "2")
text = text.replace("three", "3")
text = text.replace("four", "4")
text = text.replace("five", "5")
text = text.replace("six", "6")
text = text.replace("seven", "7")
text = text.replace("eight", "8")
text = text.replace("nine", "9")
text = text.replace("one", "o1e")
text = text.replace("two", "t2o")
text = text.replace("three", "t3e")
text = text.replace("four", "f4r")
text = text.replace("five", "f5e")
text = text.replace("six", "s6x")
text = text.replace("seven", "s7n")
text = text.replace("eight", "e8t")
text = text.replace("nine", "n9e")
# text = text.replace("zero", "0")
return text
input_file = open("input", "r")
input_file = open("input-org", "r")
summe = 0
for line in input_file:
v1, v2 = "", ""

1007
01/input

File diff suppressed because it is too large Load Diff

1000
01/input-org Normal file

File diff suppressed because it is too large Load Diff