摘要: # !/usr/bin/python3.4 # -*- coding: utf-8 -*- import os # 字节bytes转化kb\m\g def formatSize(bytes): try: bytes = float(bytes) kb = bytes / 1024 except: p 阅读全文
posted @ 2016-12-12 14:16 Littlefish- 阅读(189) 评论(0) 推荐(0) 编辑
摘要: moves=['up','left','down','right','right']def move_up(x): x[1]+=1def move_left(x): x[1]-=1def move_down(x): x[1] -= 1def move_right(x): x[1] += 1actio 阅读全文
posted @ 2016-12-12 11:38 Littlefish- 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 作者:達聞西链接:https://zhuanlan.zhihu.com/p/24162430来源:知乎著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 5.2.4 函数、生成器和类 还是从几个例子看起: def say_hello(): print('Hello!') def g 阅读全文
posted @ 2016-12-12 11:19 Littlefish- 阅读(8740) 评论(0) 推荐(1) 编辑
Document