I have a list of booleans like
l = [False, False, False, True, True, True, False, False, True, False, False]
and want to invert every edge value that is False
like
[True, True, True, True, True, True, False, False, True, True, True]
What is the most pythonic way to achieve that?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…