or运算

来源:互联网 发布:手机淘宝延长收货 编辑:程序博客网 时间:2024/06/07 21:37

  nTag == 0 and 1 or ( nTag == 1 and 9 or 85)  if nTag == 0返回1if nTag == 1返回9,否则返回85