[Tutor] Removing control characters
Marc Tompkins
marc.tompkins at gmail.com
Thu Feb 19 20:29:44 CET 2009
On Thu, Feb 19, 2009 at 11:25 AM, Dinesh B Vadhia <dineshbvadhia at hotmail.com
> wrote:
> My solution is:
>
> print ''.join[string.replace(c, r) for c in str if c in set]
>
> But, this returns a syntax error. Any idea why?
>
Probably because you didn't use parentheses - join() is a function.
--
www.fsrtechnologies.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090219/575c6d46/attachment.htm>
More information about the Tutor
mailing list