Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

SyntaxError: Positional argument follows keyword argument

# Method that takes 3 arguments and returns sum of it
def add_numbers(a, b, c):
    return a+b+c


# pass all positional arguments first and then keyword arguments
result = add_numbers(10, 20, c=30)

# print the output
print("Addition of numbers is", result)
Source by itsmycode.com #
 
PREVIOUS NEXT
Tagged: #Positional #argument #keyword #argument
ADD COMMENT
Topic
Name
8+7 =