Stupid string.split question

Duncan Booth duncan at NOSPAMrcp.co.uk
Thu Aug 7 10:43:52 EDT 2003


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())
> 
> *ducks*
> 

In what way would that be an improvement on writing

 "ABCDEF"[::-1]

? *ducks and runs*

-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?




More information about the Python-list mailing list