Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  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')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement