摘要: import os # # os.chdir("files") # # # 1. 只读模式, 打开要复制的文件 # # 追加模式, 打开副本文件 # # source_file = open("d.txt", "r", encoding="utf-8") # dst_file = open("d_b 阅读全文
posted @ 2018-08-09 15:07 goodyoung 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 1 import os 2 3 # os.rename("b.txt", "bb.txt") 4 # os.rename("first", "one") 5 6 7 8 # os.rename("one/one.txt", "two/two.txt") 9 10 # os.renames("one/ 阅读全文
posted @ 2018-08-09 14:20 goodyoung 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 1 # 9 2 # 1 * 2 * 3 * ... 9 3 4 5 6 # 9! = 9 * 8! 7 # 8 * 7! 8 # 7 * 6! 9 # .... 10 # 1! = 1 11 12 # 功能: 如果是不直接知道结果的数据, 就进行分解 9 9 * 8! 8 = 13 # 如果说, 直 阅读全文
posted @ 2018-08-09 10:02 goodyoung 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 1 # l = [i for i in range(1, 10000000) if i % 2 == 0] 2 # l = (i for i in range(1, 10000000) if i % 2 == 0) 3 # 4 # print(next(l)) 5 # print(next(l)) 6 # print(l.__next__()) 7 # 8 # f... 阅读全文
posted @ 2018-08-09 10:01 goodyoung 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 1 # 定义两个功能函数 2 def fss(): 3 checkLogin() 4 print("发说说") 5 6 7 def ftp(): 8 checkLogin() 9 print("发图片") 10 11 12 def checkLogin(): 13 print("登录验证...") 阅读全文
posted @ 2018-08-09 10:00 goodyoung 阅读(156) 评论(0) 推荐(0) 编辑