QP School
QP School
>
Tutorials
>
Python 3 Tutorials and examples
> Keyword-Only Arguments in Python 3
Full Version:
Keyword-Only Arguments in Python 3
You're currently viewing a stripped down version of our content.
View the full version
with proper formatting.
Qomplainerz
07-25-2023, 10:39 AM
def greet(name, *, prefix="Hello"):
print(prefix + ", " + name)
greet("John", prefix="Hi") # Output: Hi, John
QP School
>
Tutorials
>
Python 3 Tutorials and examples
> Keyword-Only Arguments in Python 3