摘要: import hashlib # 加密 m=hashlib.md5() # 准备使用md5方式加密 m.update('zhengfeng'.encode('utf8')) # 开始加密 print(m.hexdigest()) # 查看加密后的数据 # print(m.digest()) # 查看 阅读全文
posted @ 2020-08-01 20:42 Zack6688 阅读(86) 评论(0) 推荐(0)
摘要: sys.argv 命令行参数List,第一个元素是程序本身路径 import sys print(sys.argv)# 如果第一个参数是'haha',则打印'hello world'if sys.argv[1]=='haha': print('hello world!') 交互器: python 源 阅读全文
posted @ 2020-08-01 20:17 Zack6688 阅读(139) 评论(0) 推荐(0)
摘要: 下载官网 : https://sqlitebrowser.org/ 其他地址 : https://pc.qq.com/ 搜索"DB Browser for SQLite" 阅读全文
posted @ 2020-08-01 19:03 Zack6688 阅读(101) 评论(0) 推荐(0)
摘要: 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)