simple recursion help

Stephen Waterbury golux at comcast.net
Sun Oct 24 00:55:58 EDT 2004


Hung Jung Lu wrote:
> ...  The functional version would be:
> 
> strings = lambda Xs, k: reduce(lambda r, i: [p + x for p in r for x
> in Xs], range(k), [''])

Wow!  Grand prize for elegance.  :)



More information about the Python-list mailing list