Flip boolean values list of lists in python -
consider list of lists:
list =[[false, true], [true, false], [ false, false]]
i flip boolean values here ,
flipped_list =[[true,false], [false,true], [true, true]]
i know can loop through each list inside list , [not in child_list]
looking efficient of doing without calling for-loop
map(lambda l1: map(lambda x: not x, l1), list)
Comments
Post a Comment