SHARE
TWEET

Untitled

a guest Dec 3rd, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def my_func(first_arg, second_arg, *args):
  2.     print first_arg, second_arg
  3.     print 'other args'
  4.     print args
  5.  
  6.  
  7. my_func('one', 'two', 'three', 'four', 'five', 'etc')
  8.  
  9. def my_func2(first_arg, second_arg, *args, **kwargs):
  10.     print first_arg, second_arg
  11.     print 'other args'
  12.     print args
  13.     print 'kwargs'
  14.     print kwargs
  15.  
  16. my_func2('one', 'two', 'three', 'four', kw_one='five', kw_two='etc')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top