Re: computing with characters
- From: Mel <mwilson@xxxxxxxxxxxx>
- Date: Wed, 30 Apr 2008 15:53:16 -0400
George Sakkis wrote:
def join(iterable, sep=' ', encode=str):
return sep.join(encode(x) for x in iterable)
Actually
return encode(sep).join(encode(x) for x in iterable)
lest you get TypeErrors for non-string separators.
Mel.
.
- References:
- computing with characters
- From: SL
- Re: computing with characters
- From: Lutz Horn
- Re: computing with characters
- From: SL
- Re: computing with characters
- From: Gabriel Genellina
- Re: computing with characters
- From: SL
- Re: computing with characters
- From: Torsten Bronger
- Re: computing with characters
- From: George Sakkis
- computing with characters
- Prev by Date: Re: Python 2.6 and wrapping C libraries on Windows
- Next by Date: Re: I messed up my wxPython install (Eclipse Configuration Issue)
- Previous by thread: Re: computing with characters
- Next by thread: Re: computing with characters
- Index(es):