Answers for "python select from list by boolean list"

0

python select from list by boolean list

filtered_list = [i for (i, v) in zip(list_a, filter) if v] # filter is a list of booleans
Posted by: Guest on June-09-2021

Code answers related to "python select from list by boolean list"

Python Answers by Framework

Browse Popular Code Answers by Language