stupid newbie question about string and re

Bertrand Geston bergeston at yahoo.fr
Fri Jan 18 09:32:24 EST 2002


Hi all,

after import re and string, I do that:
>>> re.sub('( (.))',string.upper('\\2'),"I feel really stupid")

and I received that:
'Ifeelreallystupid'

I want that:
'IFeelReallyStupid (or even "IFeelSmart" ... but that is another story :-)

Where is the mistake please ?

Have a nice WE, guys.

B.



More information about the Python-list mailing list