Skip to content

Commit

Permalink
kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
Reza4096 committed Dec 2, 2022
1 parent cea5995 commit 22a0bea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions kwargs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# The special syntax **kwargs in function definitions in python is used to pass a keyworded,
# variable-length argument list. We use the name kwargs with the double star.

def myFun(**kwargs):
for key, value in kwargs.items():
print("%s == %s" % (key, value))

myFun(first='Reza', mid='Was', last='Here')

0 comments on commit 22a0bea

Please sign in to comment.