There are quite a few questions about positional/*args arguments such as this and this, but I cannot use their answers to solve my issue, thus the following question.
I defined a function where it can take an unknown number of additional arguments like this
def my_func(a, b, display=False, *args):
obj = <build something from a>
obj.add(b)
for arg in args:
obj.add(arg)
if display:
print(obj)
return obj
But when I ran it with an additional argument
my_func(a, b, display=True, c)
I got this error
SyntaxError: positional argument follows keyword argument
As I have little almost to nothing in programming, I cannot understand what the error means. Could you please help me out how to fix it?