上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页

if __name__ == '__main__':的作用

摘要: 快捷打印:在pycharm中直接打印main+enter键: __name__打印的值: 阅读全文
posted @ 2018-09-16 21:45 smileBB 阅读(252) 评论(0) 推荐(0) 编辑

sys模块

摘要: 命令行运行才行: b的内容: 阅读全文
posted @ 2018-09-14 23:31 smileBB 阅读(165) 评论(0) 推荐(0) 编辑

写excel

该文被密码保护。 阅读全文
posted @ 2018-09-14 22:38 smileBB 阅读(0) 评论(0) 推荐(0) 编辑

hashlib加解密

摘要: import hashlibs='23456'print(s.encode())m=hashlib.md5(s.encode())#必须传一个bytes类型print(m.hexdigest())#获取到加密后的结果#md5不可逆#所有一样的字符串,md5之后的结果都是一样的#撞库 在线解密的原理( 阅读全文
posted @ 2018-09-12 22:10 smileBB 阅读(213) 评论(0) 推荐(0) 编辑

发送邮件

该文被密码保护。 阅读全文
posted @ 2018-09-08 22:23 smileBB 阅读(0) 评论(0) 推荐(0) 编辑

写日志--nnlog

摘要: 日志的级别:由低到高分 阅读全文
posted @ 2018-09-08 22:06 smileBB 阅读(631) 评论(0) 推荐(0) 编辑

random模块---随机选择几个值

摘要: import random# print(random.random())#取小于1的随机小数## for i in range(100):# print(random.random())print(random.randint(1,14))#指定范围,取随机整数(顾头顾尾)随机选择值:s='sas 阅读全文
posted @ 2018-09-08 21:31 smileBB 阅读(2690) 评论(0) 推荐(0) 编辑

datetime模块

摘要: import datetimeprint(datetime.date.today())#获取当前时间的日期,只有日期print(datetime.datetime.today())#获取到当前的日期,有日期有时间print(datetime.date.today()+datetime.timedel 阅读全文
posted @ 2018-09-08 21:19 smileBB 阅读(110) 评论(0) 推荐(0) 编辑

os 模块1

摘要: import os#取绝对路径print(os.path.abspath('..\\day4'))#.代表当前目录;..代表上一级目录#获取当前路径print(os.getcwd())#更改当前工作目录os.chdir('D:\python_project\day5')print(os.getcwd 阅读全文
posted @ 2018-09-08 21:05 smileBB 阅读(127) 评论(0) 推荐(0) 编辑

除法

摘要: python 3.0 之后: 1/2=0.5; 1//2=0 实现整除; 16进制:0x15 8进制:0o10 变量在python中就是代表某值的名字 eg:x=6 (x就是变量) 变量名:包括字母、数字和下划线。变量不能以数字开头。 表达式:x+2就是一个表达式 语句:print语句和赋值语句(x 阅读全文
posted @ 2018-09-07 21:59 smileBB 阅读(181) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页