How do I convert an iterator over bytes into a str?

alex23 wuwei23 at gmail.com
Wed Aug 19 23:04:12 EDT 2009


markscottwright <markscottwri... at gmail.com> wrote:
> Thanks Jan (and all other responders).  I suppose I shouldn't be
> surprised - it's a known wart (http://wiki.python.org/moin/
> PythonWarts), but it just looks so darn wrong.

Don't forget that it's exceptionally easy to create your own mechanism
for doing this:

  def join(seq, sep):
     return sep.join(map(str, seq))



More information about the Python-list mailing list