Re: re search through a text Vs line

2014-10-05 Thread Dave Angel
Shiva Wrote in message: > OK, > Hi Dave, > > I modified it as below and it works(If there is a way to make this more > efficient please let me know) > Deends on what you mean by efficiency. The big memory efficiency gain was when you got rid of either the read or readlines. Performance

Re: re search through a text Vs line

2014-10-05 Thread Shiva
OK, Hi Dave, I modified it as below and it works(If there is a way to make this more efficient please let me know) By the way I am using Python 3.4 import sys import re def extract_names(filename): path = '/home/LearnPython/exercises/' fullfilename = path+filename print('fullfilenam