You can always pass a dictionary as an argument to a function. For instance,
dict = {'a':1, 'b':2}
def myFunc(a=0, b=0, c=0):
print(a,b,c)
myFunc(**dict)
More Related Contents:
- Passing a dictionary to a function as keyword parameters
- Function to return results in a dictionary in Python
- Using a dictionary to select function to execute
- How do Python functions handle the types of parameters that you pass in?
- How to pass dictionary items as function arguments in python? [duplicate]
- python function default parameter is evaluated only once? [duplicate]
- How do I merge two dictionaries in a single expression (take union of dictionaries)?
- Iterating over dictionaries using ‘for’ loops
- Delete an element from a dictionary
- How to merge multiple dicts with same key or different key?
- Rename a dictionary key
- Modifying a Python dict while iterating over it
- Python function attributes – uses and abuses [closed]
- Safe method to get value of nested dictionary
- How to convert an XML string to a dictionary?
- How to sum dict elements
- Extract subset of key-value pairs from dictionary?
- How does the key argument in python’s sorted function work?
- Convert a python dict to a string and back
- sort dict by value python [duplicate]
- Remove an item from a dictionary when its key is unknown
- How to apply a function to each sublist of a list in python?
- filter items in a python dictionary where keys contain a specific string
- Accessing returned values from a function, by another function
- What does the == operator actually do on a Python dictionary?
- How do I get the return value when using Python exec on the code object of a function?
- How to detect if any element in a dictionary changes?
- Finding Combinations to the provided Sum value
- Python Pickling Dictionary EOFError
- why dict objects are unhashable in python?