On defining a keyword argument before variable positional arguments, one can end up in having multiple values passed for the aforementioned parameter in case the method is called with keyword arguments. It is recommended to define keyword arguments after variable positional arguments.
def create_list(double=False, *args): # first argument will end up in `double`
return list(args)
print(create_list(1, 2, 3)) # prints `[2, 3]`
def create_list(*args, double=False):
return list(args)
print(create_list(1, 2, 3)) # prints `[1, 2, 3]`