摘要: 1.python切换目录基本操作 >>>import os >>>os.getcwd() 获取当前工作目录(current working dirctory) >>>os.chdir('......') 切换到包含要打开的文件的目录 2.打开数据文件,读取文件第一个数据行 data=open('sk 阅读全文
posted @ 2017-07-11 18:29 秋水潺流 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 1.用循环处理一个嵌套列表 def print_lol(the_list): for each_item in the_list: if isinstance(each_item,list): print_lol(each_item) else: print(each_item) 注:1).这个函数 阅读全文
posted @ 2017-07-11 17:07 秋水潺流 阅读(338) 评论(0) 推荐(0) 编辑