A
Andy Wu
Hi guys,
There's a function I want to use which looks like this:
def func(seconds = None, minutes = None, hours = None):
...
In my program I can get a string object('seconds', 'minutes', 'hours')
to specify which parameter to use, the problem is I don't know how to
call the function.
Say I have a string 'minutes' and a integer 30, now I need to call the
func this way: func(minutes = 30), how do I do this?
I'm sure this is a simple question, but I can't google it out since I
don't know how to describe it in a short term.
Thanks,
Andy Wu
There's a function I want to use which looks like this:
def func(seconds = None, minutes = None, hours = None):
...
In my program I can get a string object('seconds', 'minutes', 'hours')
to specify which parameter to use, the problem is I don't know how to
call the function.
Say I have a string 'minutes' and a integer 30, now I need to call the
func this way: func(minutes = 30), how do I do this?
I'm sure this is a simple question, but I can't google it out since I
don't know how to describe it in a short term.
Thanks,
Andy Wu