返回顶部

收藏

Boolean operation in if

更多
# number <= 10 and number >= 1 could be written as 1 <= number <= 10

number = 1
if number <= 10 and number >= 1:
    print 'Great!'
else:
    print 'Wrong!'

标签:Python,基础

收藏

0人收藏

支持

0

反对

0

»更多 您可能感兴趣的代码
  1. 2012-11-05 21:59:42java获得随机数代码 by 怪兽狂殴奥特曼
  2. 2014-09-30 14:00:53Python版的文曲星猜数字 by 山药
  3. 2014-10-06 21:26:20统计代码行数 by 风云轩
  4. 2014-10-29 21:53:10循环处理序列中的值 by 蟋蟀MM
  5. 2014-11-08 13:40:18采集文中的图片 by 风云轩
  6. 2014-11-10 16:36:17简单封装python httplib urllib2 by 张宋付
  7. 2013-06-05 13:21:25python 使用MySQLdb连接mysql by 玉开Sir
  8. 2014-11-17 14:18:00Python 简单的代理服务器 by 山药
  9. 2016-01-27 12:42:53Divide in Python by 风云轩
  10. 2016-02-06 15:51:54String Output Width and Precision by Solon.Ring
  11. 2016-02-13 11:10:53Use system function to output by xwz

发表评论