易截截图软件、单文件、免安装、纯绿色、仅160KB

Python的操作符

1.#:注释符
2.比较运算符(基本和Java类似)
<  <=  >  >=   ==   !=   <>
Python目前支持两种"不等于"比较运算符,!=和<>,分别是C风格和ABC/Pascal风格。目前后者慢慢地被淘汰了,
推荐使用前者。
在Python中,支持3<4<5这样的表达式,既简洁又优美。它实际上是下面表达式的缩写:
3<4 and 4<5
建议:合理使用括号以增加代码的可读性
在很多场合使用括号都是是一个好主意。括号在Python中不是必须存在的,不过为了可读性,使用括号总是值得的。任何维护你代码
的人都会感谢你,在你再次阅读自己的代码时,你也会感谢你自己。
3.逻辑运算符
and or not
4.布尔型
True和False(首字母均为大写)


相关文档:

Python 有权重的随机选择, Weighted Random Choice

import random def windex(lst):
    '''an attempt to make a random.choose() function that makes weighted choices
    accepts a list of tuples with the item and probability as a pair'''
    wtotal = sum([x[1] for x in lst])
   ......

scite python API

'''gen_python_api.py generates a python.api file for SciTE
The generated api file includes
*) all Python keywords
*) all builtin functions
*) all module attributes
Module functions are represented by their docstring if available,
otherwise by the function definition from the source file. ......

Python发送天气预报信息到手机

writeblog.csdn.net writeblog.csdn.net/PostEdit.aspx
这个程序很早以前就写过了,而且是参考的别人的写,具体谁的发在哪里我都忘记了。这里就算是半原创了,如有侵权请及时通知改正。
因为从今天1月1号开始,Google上订阅的天气预报服务已经取消了,估计是Google被施加压力了。反正是收不到天气预报了。正好重拾以前 ......

python性能增强工具shedskin 0.3版发布

http://code.google.com/p/shedskin/ Shed Skin 0.3 - support for 3 new standard library modules (now about 20 in total): - itertools (jeremie roquet) - heapq (jeremie roquet) - csv (converted using shedskin) - 4 new example programs (now 44 in total!): - maximum weighted matching al ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号