• different orders of ternary operands

Question related to mission Flatten a List

 

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!?!