> def join(sep, seq): > return reduce(lambda x, y: x + sep + y, seq, type(sep)())
damn, i wanted too much. Proper implementation:
def join(sep, seq):
if len(seq):
return reduce(lambda x, y: x + sep + y, seq)
return type(sep)()
but still short enough
see you,
David.
--
http://mail.python.org/mailman/listinfo/python-list
