Re: [Tutor] how to print lines which contain matching words or strings

2018-11-20 Thread Avi Gross
word at least three times on that line, no matter what the word is. You may need to tell it whether a match should be greedy and many other considerations such as ignoring case. Have fun. Avi -----Original Message----- From: Tutor On Behalf Of Asad Sent: Monday, November 19, 2018

Re: [Tutor] how to print lines which contain matching words or strings

2018-11-20 Thread Mats Wichmann
On 11/19/18 8:15 PM, Asad wrote: > Hi Avi Gross /All, > > Thanks for the reply. Yes you are correct , I would like to to > open a file and process a line at a time from the file and want to select > just lines that meet my criteria and print them while ignoring the rest. i > have crea

Re: [Tutor] how to print lines which contain matching words or strings

2018-11-20 Thread Asad
ript side this is trivial and easily understood. > > I did find in the python documentation a hello world program that uses > async IO. It helped me understand how to build an event Loop , start soon, > start later stop Loop, run forever and run until complete. That was very > helpful. But

Re: [Tutor] how to print lines which contain matching words or strings

2018-11-19 Thread Avi Gross
Asad, As others have already pointed out, your request is far from clear. Ignoring the strange use of words, and trying to get the gist of the request, would this be close to what you wanted to say? You have a file you want to open and process a line at a time. You want to select just lines tha

Re: [Tutor] how to print lines which contain matching words or strings

2018-11-18 Thread Bob Gailer
On Nov 18, 2018 1:19 PM, "Bob Gailer" wrote: > > On Nov 18, 2018 12:14 PM, "Asad" wrote: > > > > Hi All , > > > >I have a set of words and strings : > > > > like : > > > > p = [A ,"B is good" ,123456 , "C "] > > > > I have a file in which I need to print only the lines which matches the >

Re: [Tutor] how to print lines which contain matching words or strings

2018-11-18 Thread Bob Gailer
On Nov 18, 2018 12:14 PM, "Asad" wrote: > > Hi All , > >I have a set of words and strings : > > like : > > p = [A ,"B is good" ,123456 , "C "] > > I have a file in which I need to print only the lines which matches the > pattern in p > > thanks, you are welcome, but I'm not sure what you'