Re: [Tutor] getting a result from an if condition

2007-10-04 Thread Kent Johnson
Tino Dai wrote: > Hi Everybody, > > I'm having some problems with get an if block to work. > > import re > > regex=re.compile('(some expression)') > > # What I'm trying to get to work > if (m=regex.search('some long string')): > print m.groups() > > - The thing that isn't working is

[Tutor] getting a result from an if condition

2007-10-04 Thread Tino Dai
Hi Everybody, I'm having some problems with get an if block to work. import re regex=re.compile('(some expression)') # What I'm trying to get to work if (m=regex.search('some long string')): print m.groups() - The thing that isn't working is the m=regex in the if line. Is this