摘要:
1 os.getcwd() 获取当前工作目录,即当前python脚本工作的目录路径 2 os.chdir("dirname") 改变当前脚本工作目录;相当于shell下cd 3 os.curdir 返回当前目录: ('.') 4 os.pardir 获取当前目录的父目录字符串名:('..') 5 o 阅读全文
posted @ 2020-08-01 18:53
Zack6688
阅读(102)
评论(0)
推荐(0)
摘要:
随机数 1 mport random 2 print random.random() 3 print random.randint(1,2) 4 print random.randrange(1,10) 生成随机验证码1 1 import random 2 checkcode = '' 3 for 阅读全文
posted @ 2020-08-01 18:46
Zack6688
阅读(123)
评论(0)
推荐(0)
摘要:
#_*_coding:utf-8_*_ import time # print(time.clock()) #返回处理器时间,3.3开始已废弃 , 改成了time.process_time()测量处理器运算时间,不包括sleep时间,不稳定,mac上测不出来# print(time.altzone) 阅读全文
posted @ 2020-08-01 18:34
Zack6688
阅读(114)
评论(0)
推荐(0)

浙公网安备 33010602011771号