过滤(s='good ' if m%2==0 else 'bad')
2013-12-27 13:45
357 查看
#coding:utf-8 def main(m): '''这个方法主要是用于过滤奇偶数, 如果是偶数,输出good,否则输出bad''' s='good ' if m%2==0 else 'bad' print s if __name__ == '__main__': main(4) # good main(5) # bad
相关文章推荐
- How naive it's to believe node.js good for IO but bad for Computation?
- centos5.4中安装nodeJs(错误fpu = 'vfpv3' if armv7 else 'vfpv2'的解决)
- gitolite:bad reponame 'xxx/.*$' or you forgot to set $GL_WILDREPOS
- requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
- 提权成功了:既然过滤了'/'字符,为什么不再加一个'/'呢
- good guys's web
- 24. 'After you' is good manners. “您先请”是礼貌
- That's a good suggestion for leaning english better
- error LNK2023: bad DLL or entry point 'msobj80.dll' 解决方法
- <s:if test="canSubscribe == 'Y'">能 </s:if> <s:else>不能 </s:else> 单字符需加.toString()
- LXC+PBS+集群调度 msg: 'Bad UID for job execution MSG=connection to mom timed out'
- HTTP Server 'Bad Gateway' ( Android adt 或者 sdk 更想不了的解决方案)
- Torvalds' quote about good programmer
- [转贴]19 things to think about when you're having a bad day
- To be a Good Programmer, You'd Find a Pair Programmer
- CentOS 5.9编译内核2.6.24提示Error: bad register name `%dil'
- jquery过滤特殊字符',防sql注入
- sql里的通配符过滤 '_' '%' '[]'
- Spring MVC出现POST 400 Bad Request &405 Request method 'GET' not supported
- git log 错误解决 bad default revision 'HEAD'