Justin Azoff a écrit : > Simon Forman wrote: > >>That third option seems to work fine. > > > Well it does, but there are still many things wrong with it > (snip)
> tok = '' > tok = toc + c > should be written as > tok = [] > tok.append(c) > and later > ''.join(toc) IIRC, string concatenation slowness has been fixed a few versions ago - at least in CPython - , so there's no more reason to use this idiom. (snip) -- http://mail.python.org/mailman/listinfo/python-list