def example(a, b, c=100):
… a = 1 # notice here I am assigning ‘a’
… b = 2 # and here the value of ‘b’ is being overwritten
… # The value of c is set to 100 by default
… print(a,b,c)
…example(4,5) # Here I am passing in 4 for a, and 5 for b
(1, 2, 100) # but notice its not taking any effectexample(9,10,11) # Here I am passing in a value for c
(1, 2, 11)
可以进一步参考这篇博文,原文链接