刘珲的博客

导航

2020年7月6日 #

关于邮箱发送邮件二之附件及图片

摘要: import smtplibfrom email.mime.text import MIMETextfrom email.header import Headerfrom email.mime.multipart import MIMEMultipartfrom email.mime.base im 阅读全文

posted @ 2020-07-06 23:37 刘珲的博客 阅读(535) 评论(0) 推荐(0) 编辑

关于邮箱发送邮件

摘要: import smtplibfrom email.mime.text import MIMETextfrom email.header import Header# come_from 是自己的邮箱,password是邮箱的授权码come_from = '2577452716@qq.com'# wh 阅读全文

posted @ 2020-07-06 16:30 刘珲的博客 阅读(86) 评论(0) 推荐(0) 编辑

关于算法

摘要: 面试题 def num(): return [lambda x: i*x for i in range(4)]print([m(2) for m in num()]) # 输出: [6, 6, 6, 6] 思路: 这题涉及到了闭包延时绑定,当循环执行完了之后才会执行传参,循环四次,每一次循环完 i= 阅读全文

posted @ 2020-07-06 12:21 刘珲的博客 阅读(139) 评论(0) 推荐(0) 编辑

python中常见的数据类型

摘要: str 常用方法 1. 索引(下标) s = 'ABCDEFGHIJKLMN's1 = s[0]print('s[0] = ' + s1) #s[0] = A 2. 切片:顾头不顾尾 s = 'ABCDEFGHIJKLMN's2 = s[0:3]print('s[0:3] = ' + s2) #s[ 阅读全文

posted @ 2020-07-06 12:18 刘珲的博客 阅读(420) 评论(0) 推荐(0) 编辑