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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -