摘要: 1. dict represents a dictionary use dict.get('e',0) instead of dict['e'] to get the value of 'e' if you are not sure that 'e' is included in dict 阅读全文
posted @ 2015-05-19 10:18 Rayvin 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 如何debug1.设置断点:在Python编辑器中要调试的代码行右击->Set Breakpoint,之后该行底色就变黄了2.打开debugger:Python Shell->Debug->Debugger3.编辑窗口按F54.debug过程略Go表示运行完相当于eclipse的F8,不过按F5后先... 阅读全文
posted @ 2015-05-17 09:32 Rayvin 阅读(421) 评论(0) 推荐(0) 编辑
摘要: 1. tuples: (3) -> 3 but (3,) indicates a tuple -> (3,) 2. tuples and lists: tuples:num = (1,2,3) (3,) 不可修改 num(1) = 4 -> 'error' can lists:num ... 阅读全文
posted @ 2015-05-16 11:09 Rayvin 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 1.http://blog.csdn.net/chr23899/article/details/404006072.http://blog.csdn.net/jelly441/article/details/20575599 阅读全文
posted @ 2015-05-16 10:49 Rayvin 阅读(114) 评论(0) 推荐(0) 编辑
摘要: word 2013 + Endnote1.自动生成目录大纲视图->大纲级别->引用->目录2.设置不连续页码插入分节符:页面布局->分隔符->分节符->下一页设置页码格式:勾选页码编号.起始页码3.endnote导入参考文献 需要再仔细学习 参考:http://blog.renren.com/b... 阅读全文
posted @ 2015-05-15 14:21 Rayvin 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 1.Suggest that testing equality of floats is not exact – Use abs(x-y) < 0.0001, rather than x == y2. str.swapcase():upper to lower,lower to upper, a c... 阅读全文
posted @ 2015-05-05 20:31 Rayvin 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 1. i/j – division – if both are ints, result is int, represen9ng quo9ent without remaindere.g. 3/2 = 1 3.0/2 = 1.5 but -3/2 = -22. --2 >>> 23. 'a' ... 阅读全文
posted @ 2015-04-29 22:02 Rayvin 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 1.python 语法对 空格,缩进有严格要求2.file objects contain a special pair of built-in methods:__enter__()and__exit__() such as: with open("text.txt", "w") as v: ... 阅读全文
posted @ 2015-04-20 13:34 Rayvin 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 1. print for x in range(1,11) if x % 2 == 0 输出1-10内的偶数 阅读全文
posted @ 2015-04-18 16:49 Rayvin 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 1.print char 与 print char, 有很大区别 print char, 在一行输出2.enumerate functionworks by supplying a corresponding index to each element in the list that you pa... 阅读全文
posted @ 2015-04-17 10:52 Rayvin 阅读(170) 评论(0) 推荐(0) 编辑