Keyword Arguments

Ryan ryanscott at
Fri Nov 14 22:41:59 CET 2003

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"


I would like the keyword to be the value of item which is temperature.
Is this possible?


More information about the Python-list mailing list