码迷,mamicode.com
首页 > 编程语言 > 详细

python 形参

时间:2017-07-24 13:21:42      阅读:171      评论:0      收藏:0      [点我收藏+]

标签:pytho   python   --   ict   ==   int   dict   font   span   

def fun(x="dx",y="dy"):
print "fun------"
print x
print y

fun()
fun("aa","bb")
fun(x="ha",y="la")

ct = dict(x="haha",y="lala")
fun(**ct)

==================================
fun------
dx
dy
fun------
aa
bb
fun------
ha
la
fun------
haha
lala
=============================

python 形参

标签:pytho   python   --   ict   ==   int   dict   font   span   

原文地址:http://www.cnblogs.com/mhc-fly/p/7227912.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!