填空:
(___________________)
letters = 'ABCDEFG'
bools = [True, False, True, True, False]
list(________________)
['A', 'C', 'D']
填空:
(___________________)
letters = 'ABCDEFG'
bools = [True, False, True, True, False]
list(________________)
['A', 'C', 'D']
找到答案了
from itertools import compress
compress(letters, bools)