04 2021 档案

摘要:在爬虫有一些需求需要把多个空格替换一个或者是把多个相同的字符值保留一个,实现方法用re.sub 直接上代码 strs = "核算处 期" new_strs = re.sub(r" +",' ', strs) print(new_strs) strs = "核算处 期" new_strs = re.s 阅读全文
posted @ 2021-04-28 19:36 淋哥 阅读(2074) 评论(0) 推荐(1) 编辑
摘要:今天想知道for循环的速度,所以做一下测试 1. for循环一万次 耗时2毫秒 2. for循环十万次 耗时22毫秒 3. for循环一百万次 耗时304毫秒 4. for循环一千万次 耗时2337毫秒,也就是2.3秒 5. for循环一亿次 耗时23468毫秒,也就是23.4秒 为什么要做这个测试 阅读全文
posted @ 2021-04-20 21:47 淋哥 阅读(4569) 评论(0) 推荐(0) 编辑
摘要:123 阅读全文
posted @ 2021-04-19 17:12 淋哥 阅读(42) 评论(0) 推荐(0) 编辑
摘要:1 . python3 环境 python3 content 输出是 bytes text 输出是 str python 2 环境 python2 content 输出是 str text 输出是 unicode 阅读全文
posted @ 2021-04-15 15:13 淋哥 阅读(236) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/AllBloggers.aspx 阅读全文
posted @ 2021-04-14 09:21 淋哥 阅读(40) 评论(0) 推荐(1) 编辑
摘要:直接上代码备忘 import smtplib from email.mime.text import MIMEText from email.header import Header from email.mime.multipart import MIMEMultipart def send_em 阅读全文
posted @ 2021-04-02 11:07 淋哥 阅读(84) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示