Open this example in the interactive library
Source code
def price(amount, /, *, tax=0):
return amount + tax
print(price(12, tax=2))Sample output
14

Define positional-only and keyword-only arguments in Python.
Open this example in the interactive library
def price(amount, /, *, tax=0):
return amount + tax
print(price(12, tax=2))14