On 2009-04-17 16:57, Eugene Perederey wrote:
According to documentation re.findall takes a compiled pattern as a
first argument. So try
patt = re.compile(r'(am|an)')
re.findall(patt, s1)
re.findall(patt, s2)

No, it will take a string pattern, too.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to