On Mon, Sep 29, 2008 at 6:19 PM, Srinivas Iyyer
<[EMAIL PROTECTED]> wrote:
> Hi Tutors,
> I have a list with elements as strings. I want to search if any of these
> element strings has two words of my interest. How can I ask re.compile to
> look for both words.
>
> my words are 'good' and 'bad'.
On Mon, Sep 29, 2008 at 03:19:02PM -0700, Srinivas Iyyer wrote:
> Hi Tutors,
> I have a list with elements as strings. I want to search if any of these
> element strings has two words of my interest. How can I ask re.compile to
> look for both words.
>
> my words are 'good' and 'bad'.
>
> imp
Hi Tutors,
I have a list with elements as strings. I want to search if any of these
element strings has two words of my interest. How can I ask re.compile to look
for both words.
my words are 'good' and 'bad'.
import re
pat = re.compile('good'+'bad')
a = ['Rama is a good boy','Raghu is a g