Tag Archives: positional argument follows keyword argument

[Solved] Python Error: positional argument follows keyword argument

Syntax error: position argument follows keyword argument
syntax error: position parameter follows keyword parameter
error example </ font>

def sub(a, b):
    return

s3 = sub(a = 9, 3)
s4 = sub(b = 9, 3)

When a function is called, an error will be reported if the parameter passed (····, formal parameter = argument, argument, ······) occurs
solution:
make the following modifications

def sub(a, b,):
    return
s0 = sub(9,3)
s1 = sub(a=9, b=3)
s2 = sub(9, b = 3)