Reputation: 1415
For example:
def tune(a=2,b=3,c=4):
return str(a) + " " + str(b) + " " + str(c)
print tune(5, *default*, 7)
so that the output would be:
5 3 7
What do I put in place of the *default*
to make this happen?
Upvotes: 1
Views: 45
Reputation: 52191
Use default named arguments. Explicitly mention that c
has to take the value of 7
>>> print tune(5, c= 7)
5 3 7
Upvotes: 6