01 2017 档案

摘要:func=lambda a: a+1 ret=func(99) print(ret) 阅读全文
posted @ 2017-01-24 13:54 张兮兮 阅读(139) 评论(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 张兮兮 阅读(964) 评论(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 张兮兮 阅读(138) 评论(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 张兮兮 阅读(123) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-01-19 16:54 张兮兮 阅读(1) 评论(0) 推荐(0)
摘要:collection 类 dic=collections.OrderedDict()//有序字典 //dic=dict() dic['k1']='v1' dic['k2']='v2' dic['k3']='v3' print(dic) dic.move_to_end('k1')//把第一个移到最后 阅读全文
posted @ 2017-01-19 11:46 张兮兮 阅读(164) 评论(0) 推荐(0)