摘要: func=lambda a: a+1 ret=func(99) print(ret) 阅读全文
posted @ 2017-01-24 13:54 张兮兮 阅读(133) 评论(0) 推荐(0) 编辑
摘要: def show(arg): print(arg) n=[11,22,33] show(n) def show(*arg): print(arg,type(arg)) show(1,11,22,33) (1,11,22,33) tuple def show(**arg): print(arg,typ 阅读全文
posted @ 2017-01-24 13:46 张兮兮 阅读(959) 评论(0) 推荐(0) 编辑
摘要: #无参数 #show() 》show() #一个参数 def show(arg): print(arg) show('kkk') #两个参数 def show(arg,xx): print(arg,xx) show('kkk','77') #默认参数,必须放在最后 def show(a1,a2=99 阅读全文
posted @ 2017-01-24 13:03 张兮兮 阅读(130) 评论(0) 推荐(0) 编辑
摘要: def mail(): n=123 n+=1 print(n) return 1 mail() 执行 # import smtplib from email.mime.text import MIMEText from emial.utils import formataddr def mail(u 阅读全文
posted @ 2017-01-24 11:40 张兮兮 阅读(118) 评论(0) 推荐(0) 编辑