by basketcasing · 10y ago · 0 comments
I think Python could easily be replaced --- for greenfield projects --- by something better, but there's nothing better right now, and more and more people will keep using Python for that very reason.
`','.join(pieces)` just seems unnecessarily weird, and present simply for OO's sake. Not everything needs to be some object's method.
>>> phrases = [['a', 'b', 'c'], ['d', 'e']]
>>> print(list(map('-'.join, phrases)))
['a-b-c', 'd-e']