Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to Use **kwargs in Python
- **kwargs allows us to pass a variable number of keyword arguments to a Python function. In the function, we use the double-asterisk (**) before the parameter name to denote this type of argument.
- def total_fruits(**kwargs):
- print(kwargs, type(kwargs))
- total_fruits(banana=5, mango=7, apple=8)
- for more:https://www.clictune.com/ez0F
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement