i have a file similar to that shown below- is it possible to perform a regex expression
text1 769,230,123
text2 70
text3 213,445
text4 24,356
text5 1,2,4
to give output as shown here?
['769','230','123']
['70']
['213','445']
My current code is as follows:
with open(filename,'r') as output:
for line in output:
a = line
a = a.strip()
#regex.compile here
print regex.findall(a)
Any help or direction would be greatly useful to me. Thank you