Re: [Tutor] How to print lines within two timestamp

2018-10-27 Thread Alan Gauld via Tutor
On 27/10/2018 08:02, Asad wrote: >>> string = f3.read () >>> regex = re.compile ( "\n" ) >>> st = regex.sub ( " ", string ) >> >> I suspect regular string methods would be simpler here. >> answer : can you please provide the code to replace above st = string.replace("\n"," ") >>> if re.search ('

Re: [Tutor] How to print lines within two timestamp

2018-10-26 Thread Peter Otten
Alan Gauld via Tutor wrote: > On 26/10/2018 18:45, Alan Gauld via Tutor wrote: > >> It woiyukld > > No idea what happened there. Should be "would" of course! Of coiyukrse! Nobody thoiyukght otherwiiyske :) ___ Tutor maillist - Tutor@python.org To u

Re: [Tutor] How to print lines within two timestamp

2018-10-26 Thread Alan Gauld via Tutor
On 26/10/2018 18:45, Alan Gauld via Tutor wrote: > It woiyukld No idea what happened there. Should be "would" of course! -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/p

Re: [Tutor] How to print lines within two timestamp

2018-10-26 Thread Alan Gauld via Tutor
On 26/10/2018 12:33, Asad wrote: > Hi , > > Yes i have the code : It woiyukld help us to help you if you provided some clues as to what it was doing. A good start would be some comments - especially around the regexes. Don't make us parse them without some idea of what you are expecting. Also mor