12 lines
248 B
Python
12 lines
248 B
Python
text: str = open("input.txt", "r").read()
|
|
|
|
value: int = 0
|
|
|
|
for line in text.split("\n"):
|
|
for index, chars in enumerate([line[::-1], line]):
|
|
for char in chars:
|
|
if (char.isdigit()):
|
|
value += int(char) * 10 ** index
|
|
break;
|
|
|
|
print(value) |