Guest User

Untitled

a guest
Mar 26th, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. >>> def foo(**kwargs):
  2. ... print(kwargs)
  3. ... print(kwargs['key1'],kwargs['key2'])
  4. ...
  5. >>> bar = {'key2': 'val2', 'key1': 'val1'}
  6. >>> foo(**bar)
  7. {'key2': 'val2', 'key1': 'val1'}
  8. val1 val2
  9. >>>
Advertisement
Add Comment
Please, Sign In to add comment