Stupid string.split question
Delaney, Timothy C (Timothy)
tdelaney at avaya.com
Thu Aug 7 19:36:31 EDT 2003
> From: Duncan Booth [mailto:duncan at NOSPAMrcp.co.uk]
>
> Brian Kelley <bkelley at wi.mit.edu> wrote in
> news:3f326199$0$3951$b45e6eb0 at senator-bedfellow.mit.edu:
>
> > Now, as for old chesnuts and long hot summers, if one could just do:
> >
> > "".join(list("ABCDEF").reverse())
> >
> In what way would that be an improvement on writing
>
> "ABCDEF"[::-1]
In-place reverse *and* returning the result.
*stands proudly tall, smug expression on face*
TIm Delaney
More information about the Python-list
mailing list