Why is my code extracting individual digits in a number instead of the number (i.e. "300" is extracted as 3, then 0, then another 0)?
import re
open_file = open("regex_sum_42.txt")
read_file = open_file.read()
for line in read_file:
line = line.rstrip()
num_list = re.findall(".*([0-9])+",line)
if len(num_list)>0:
print num_list