1def myfunc(a,b, *args, **kwargs):
2 c = kwargs.get('c', None)
3 d = kwargs.get('d', None)
4 #etc
5myfunc(a,b, c='nick', d='dog', ...)
1def myfunc(a,b, *args, **kwargs):
2 c = kwargs.get('c', None)
3 d = kwargs.get('d', None)
4 #etc
5myfunc(a,b, c='nick', d='dog', ...)
6
1def to_smash(total_candies, n_friends=3):
2 return total_candies % n_friends
3
4 #Here n_friends is Optional Parameter
1def some_function (self, a, b, c, d = None, e = None, f = None, g = None, h = None):
2 #code
3