Just as a matter of curiosity piqued by having to understand someone
else's code. Is the difference here just a matter of style, or is one
better somehow than the other?

>>> l
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

>>> ','.join([str(x) for x in l])
'0,1,2,3,4,5,6,7,8,9,10'

>>> ','.join(map(lambda x:str(x), l))
'0,1,2,3,4,5,6,7,8,9,10'
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to