A trivial question about print
Max M
maxm at mxm.dk
Fri Apr 12 04:24:43 EDT 2002
Alex Martelli wrote:
> I have my doubts that the BDFL wants to special-case the join method to
> save 5 characters over a map call:
>
> ','.join(map(str, range(10))
Given the three choises discussed:
','.join(range(10), str) # new proposal
','.join(map(str, range(10))) # map
','.join([str(i) for i in range(10)])) # list comprehension
I must agree. There isn't much saved and it's less flexible.
Damn I hate discussing with you!
regards Max M
More information about the Python-list
mailing list