I am trying to pass both positional and optional parameters to a function.
The below code works in python 3:
def something(*args, cookie=None):
for arg in args:
print(arg)
print('cookie is ' + cookie)
something('a', 'b', 'c', cookie='oreo')
but it gives
SyntaxError: invalid syntax
when using python 2.
Is something like this possible in python 2?