python布尔值取反

发布时间:2019-09-24 08:27:17编辑:auto阅读(6560)

    在python中遇到需要对布尔值进行取反,做个笔记:

    b = True
    b = bool(1-b)  # 取反

     

关键字