Baolong zhen wrote:
less list creation.

At the cost of doing this at each 'flatten' call:

if res is None:
   res = []

The number of situations of executing above code is the same as the number of list creations (once for each 'flatten' call, obviously).

Is list creation really more costly than above?

Regards,
mk

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to