上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页
摘要: import string # print(string.ascii_letters)#大小写 # print(string.ascii_lowercase) # print(string.ascii_uppercase) # print(string.digits) # print(string. 阅读全文
posted @ 2020-08-22 18:23 Mezhou 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 文件操作模式 : 只读模式 r f=open('a.txt','r',encoding='utf-8') 不写时默认是r模式。可读不可写。 只写模式 w f=open('a.txt','w',encoding='utf-8') 可写不可读,写时会将原始内容清空。 追加模式 a f=open('a.t 阅读全文
posted @ 2020-08-22 18:22 Mezhou 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 深拷贝: l = [0,1,2,2,3,4,5,6,7,8,9] # 0 1 2 3 4 5 6 7 8 9 10 import copy l2 = copy.deepcopy(l)#深拷贝,内存地址不一样 浅拷贝: l = [0,1,2,2,3,4,5,6,7,8,9] # 0 1 2 3 4 5 阅读全文
posted @ 2020-08-22 18:01 Mezhou 阅读(114) 评论(0) 推荐(0) 编辑
摘要: count 计数 s = ', abczjr ha,hah,\n ' print(s.count('a')) index() 指定字符串的索引 print(s.index('a')) print(s.index('a',0,10))#指定范围 find() 指定字符串的索引 print(s.find 阅读全文
posted @ 2020-08-21 21:26 Mezhou 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 字典: d = { 'username':'zjr', 'id':1 , 'grade':'tmz', 'addr':'bj', 'age':18, } 增加值: d['money']=100 d['id']=2#会更改已经存在的值 d.setdefault('car','bmw') d.setde 阅读全文
posted @ 2020-08-21 20:58 Mezhou 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 数组又叫列表 定义空列表: list=[] 定义列表: students_new = ['zjr','tzy','hahah'] 列表中取值: print(students_new[0]) #根据下标、索引、编号、角标取值 print(students_new[-1])#取最后一个元素 往列表中添加 阅读全文
posted @ 2020-08-14 20:52 Mezhou 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 字符串拼接有3种方法 第一种就是用+号拼接 1 import datetime 2 #字符串格式化 3 today =str(datetime.datetime.today()) 4 name = 'zjr' 5 #直接拼接 6 print(name+',欢迎登陆,今天的日期是'+today)#内存 阅读全文
posted @ 2020-08-14 20:25 Mezhou 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 抓https接口需要特殊设置: 参考:https://www.cnblogs.com/fighter007/p/9162617.html 弱网设置 篡改请求和返回 原理图: 设置断点 开启断点 当访问打断点的接口时会直接跳转charles,请求拦截成功 做代理,远程转发 设置好后,访问A地址时会自动 阅读全文
posted @ 2020-08-07 20:44 Mezhou 阅读(121) 评论(1) 推荐(0) 编辑
摘要: 1、在start.py中添加代码(在未安pycharm时也好使) 1 import sys,os 2 base_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 3 sys.path.insert(0,base_pa 阅读全文
posted @ 2020-05-14 22:13 Mezhou 阅读(184) 评论(0) 推荐(0) 编辑
摘要: catalina.sh中修改: JAVA_OPTS="-server -Xms512m -Xmx4096m -XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=../logs/serverDump.hpro 阅读全文
posted @ 2020-05-12 16:12 Mezhou 阅读(136) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页