R
Ryan
How can I use the value of a variable to represent a keyword in a function call?
For example:
def foo(**kwargs):
kwargs = **kwargs
item = "temperature"
foo(item=25.5)
I would like the keyword to be the value of item which is temperature.
Is this possible?
Thanks
Ryan
For example:
def foo(**kwargs):
kwargs = **kwargs
item = "temperature"
foo(item=25.5)
I would like the keyword to be the value of item which is temperature.
Is this possible?
Thanks
Ryan