Usage of *args and * * kwargs in Python

From , 4 Years ago, written in Python, viewed 50 times.
URL https://pastebin.vip/view/a9cf46a3
  1. def fun_var_args(farg, *args):  
  2.     print "arg:", farg  
  3.     for value in args:  
  4.         print "another arg:", value  
  5.  
  6. fun_var_args(1, "two", 3) # *args可以当作可容纳多个变量组成的list  
  7.  
  8.  

Reply to "Usage of *args and * * kwargs in Python"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website