-
-
Save T-Bharath/08e305407d3f5e845a03a46b357a9443 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
f = open("1234.txt") | |
x = list() | |
for l in f: | |
l = l.rstrip() | |
a = re.findall('[0-9]+',l) | |
for b in a: | |
c = int(b) | |
x.append(c) | |
print(sum(x)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment