Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 338 Bytes

python_kwargs.md

File metadata and controls

15 lines (12 loc) · 338 Bytes

Python **kwargs

Pass in positional keyword args into a function. e.g.

# concatenate.py
def concatenate(**kwargs):
    result = ""
    # Iterating over the Python kwargs dictionary
    for arg in kwargs.values():
        result += arg
    return result

print(concatenate(a="Real", b="Python", c="Is", d="Great", e="!"))