heberoxx 发表于 2017-4-26 09:49:09

python函数定义

  def foo(str,str2):
    print str,str2
foo("hello","world!")
  
def welcome(*arg):
    print arg
   
welcome("hello","world!")
  
def welcome(**arg):
    print arg
   
welcome(name='lwp',age=100)
页: [1]
查看完整版本: python函数定义