[Tutor] Help with re module maybe?

R. Alan Monroe amonroe at columbus.rr.com
Sat Nov 20 18:21:36 CET 2004


> def splitter(s):
>      ''' Split a string on each plus sign that is not inside parentheses '''


Stupid question: how do you test generators in the interactive
interpreter? Simply calling it didn't give me the result I expected...

>>> splitter('x+(y+z)')
<generator object at 0x008F9508>


Alan



More information about the Tutor mailing list