rename main to part1
This commit is contained in:
parent
0337e63d9f
commit
a2b8f6544b
@ -1,13 +1,11 @@
|
|||||||
text: str = open("input.txt", "r").read()
|
text: str = open("input.txt", "r").read()
|
||||||
|
|
||||||
import string
|
|
||||||
|
|
||||||
value: int = 0
|
value: int = 0
|
||||||
|
|
||||||
for line in text.split("\n"):
|
for line in text.split("\n"):
|
||||||
for index, chars in enumerate([line[::-1], line]):
|
for index, chars in enumerate([line[::-1], line]):
|
||||||
for char in chars:
|
for char in chars:
|
||||||
if (char in string.digits):
|
if (char.isdigit()):
|
||||||
value += int(char) * 10 ** index
|
value += int(char) * 10 ** index
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user