摘要: os.getcwd() 当前目录 =Linux中的pwd os.chdir("c:\\Users") or os.chdir(r"c:\Users") 切换目录 ; 等于shell中cd os.curdir 返回当前目录 os.pardir 回到当前目录的父目录 os.makedirs(r"c:\a 阅读全文
posted @ 2020-03-04 18:49 159566 阅读(166) 评论(0) 推荐(0)
摘要: random.random() 随机[0,1)的浮点数 random.randint(1,3) 随机1到3的整数[1,3] random.randrange(1,3) 1,2 random.choice('hello') random.choice([1,2,3]) 序列中随机取 random.sa 阅读全文
posted @ 2020-03-04 17:35 159566 阅读(173) 评论(0) 推荐(0)