yet another "Here's to 1.5.2" post
Duncan Booth
duncan at NOSPAMrcp.co.uk
Wed Apr 10 05:25:49 EDT 2002
Syver Enstad <syver-en+usenet at online.no> wrote in
news:upu18x4h3.fsf at online.no:
> Am I the only one in the entire world that thinks '\t'.join(mylist) is
> elegant and natural?
>
Probably not, but I think that if the string is a literal I prefer:
str.join('\t', mylist)
although I have also been known to write code like this:
joinlines = '\n'.join
...
joinlines(mylist)
--
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