摘要:
import time start =time.clock() sum=0 for i in range(1,101): sum=sum+i print(sum ) end = time.clock() print('Running time: %s Seconds'%(end-start)) 阅读全文
posted @ 2019-07-24 19:52
一杯明月
阅读(1195)
评论(0)
推荐(0)
摘要:
.readline() 和 .readlines() 之间的差异是后者一次读取整个文件,象 .read() 一样。.readlines() 自动将文件内容分析成一个行的列表,该列表可以由 Python 的 for … in … 结构进行处理。另一方面,.readline() 每次只读取一行,通常比 阅读全文
posted @ 2019-07-24 15:39
一杯明月
阅读(1345)
评论(0)
推荐(0)
浙公网安备 33010602011771号