1st
flatlist = lambda e: type(e) == list and sum( map( flatlist, e ), [] ) or [e]
2nd
flatlist = lambda e: type(e) != list and [e] or sum( map( flatlist, e ), [] )
#
when [] is given, the 1st returns [[]]
but the 2nd returns []
Why!?!
Created at: 2019/05/09 00:03; Updated at: 2019/05/13 05:25