我想要反转列表中的所有布尔值,如下所示:
a=[True,False,True]
对此:
b=[False,True,False]
我试过了
not a
但它只给我一个假.
python list
list ×1
python ×1