网页学习体会

  • 首页
  • 个人博客
您的位置: 首页  >  IT文章  >  python and ...or ...

python and ...or ...

分类: IT文章 • 2025-02-02 13:32:43
print(0 and 1 or 5) #5 and x and y  x为假 取x x为真 取y  or e or f  e为假 取f  e为真 取e
print(1 and 1 or 5) #1
print(2 and 0 or 5) #5
print(0 and 0 or 1) #1
print(1 and 1 or 0) #1
print(3 and 0 or 0) #0
print(0 and 1 or 0) #0

相关推荐

  • 动态解析冒泡排序—Python
  • python单元测试
  • 一张图认识Python(附基本语法总结)
  • python多线程多进程
  • python数据库备份
  • Python-自动化测试面试
  • python中的继承、多继承、超继承
  • Cannot set up a python SDK Python3.7. The SDK seems inval...  
  • 【Python第31课到42课】
  • python 知识
  • Linux MySQL8.0.24 二进制安装 单机-多实例-多实例升级 [测试环境]
  • 实用的几个JS新特性(es 2016)
    网站免责声明 网站地图 最新文章 用户隐私 版权申明
本站所有数据收集于网络,如果侵犯到您的权益,请联系网站进行下架处理。   

Copyright © 2018-2021   Powered By 网页学习体会    备案号:   粤ICP备20002247号