上一页 1 ··· 51 52 53 54 55 56 57 58 59 ··· 72 下一页
摘要: 为了提高效率,减少使用鼠标,有时候想直接通过终端的命令打开一个图片进行查看。可以使用的命令有: eog filenamedisplay filename 再使用Alt+F4就可以关闭窗口,尽量达到手不离键盘。 阅读全文
posted @ 2017-06-12 12:18 2021年的顺遂平安君 阅读(83) 评论(0) 推荐(0)
摘要: import time as tfrom os import pathdef createFile(dest): date = t.localtime(t.time()) name = '%d_%d_%d.txt' %(date[1],date... 阅读全文
posted @ 2017-06-11 20:38 2021年的顺遂平安君 阅读(65) 评论(0) 推荐(0)
摘要: 查看当前目录下所要创建的 文件是否已经存在,如果不存在就创建,并写入30个换行( ) 要点: 所要读写的文件名可以是_变量_ 阅读全文
posted @ 2017-06-11 20:38 2021年的顺遂平安君 阅读(159) 评论(0) 推荐(0)
摘要: 基本用法: Dictionary 使用 不能返回一个list,需要使用 或`sorted(D)`,会返回 Dictionary 的 keys,并存入 list。 阅读全文
posted @ 2017-06-11 17:19 2021年的顺遂平安君 阅读(415) 评论(0) 推荐(0)
摘要: 基本用法: .keys.values.items >>> D = dict(a=1,b=2,c=3)>>> D{'a': 1, 'b': 2, 'c': 3}>>> D.keys>>> D.keys()dict_keys(['a', 'b', 'c']... 阅读全文
posted @ 2017-06-11 17:19 2021年的顺遂平安君 阅读(65) 评论(0) 推荐(0)
摘要: range 不是 iterator >>> R = range(3)>>> next(R)Traceback (most recent call last): File "", line 1, in TypeError: 'range' object ... 阅读全文
posted @ 2017-06-11 17:08 2021年的顺遂平安君 阅读(93) 评论(0) 推荐(0)
摘要: 1. _range_ 不是 iterator 2. _range_ 允许 multiple iterators,并且能记住每个iterator的位置。 ,`map filter`都不允许 multiple iterators。它们的 iter 就是它们本身,因为不需要专门使用 iter 函数。 阅读全文
posted @ 2017-06-11 17:08 2021年的顺遂平安君 阅读(942) 评论(0) 推荐(0)
摘要: 要注意 _zip_ 也是_one pass iterator !被遍历一次之后会自动_消失_。 zip类型支持list,next等: 阅读全文
posted @ 2017-06-11 17:00 2021年的顺遂平安君 阅读(176) 评论(0) 推荐(0)
摘要: >>> z = zip((2,3,4),(33,44,55))>>> z>>> list(z)[(2, 33), (3, 44), (4, 55)] 要注意 ** zip 也是_one-pass iterator** !被遍历一次之后会自动_消失_。 ... 阅读全文
posted @ 2017-06-11 17:00 2021年的顺遂平安君 阅读(59) 评论(0) 推荐(0)
摘要: Ctrl + a – go to the start of the command line Ctrl + e – go to the end of the command line Ctrl + k – delete from cursor to ... 阅读全文
posted @ 2017-06-11 16:25 2021年的顺遂平安君 阅读(65) 评论(0) 推荐(0)
上一页 1 ··· 51 52 53 54 55 56 57 58 59 ··· 72 下一页