I think you wanted to write this instead:
print f(*[ 1, 2]) # Python 2
print(f(*[ 1, 2])) # Python 3
What the *
does, is something called unpacking. In this case, where you are unpacking a list. It's usually used to pass a list as "independent" parameters to a function, for example:
def f(a, b):
print a
print b
You can call it like
f(*[1, 2]) # with unpacking
which is equivalent to
f(1, 2)