Skip to content

Instantly share code, notes, and snippets.

@ZhigangPu
Created March 6, 2019 06:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZhigangPu/a7a96516bdf0846908b03319881493c9 to your computer and use it in GitHub Desktop.
Save ZhigangPu/a7a96516bdf0846908b03319881493c9 to your computer and use it in GitHub Desktop.
args
# dict
def greet_me(**kwargs):
for key, value in kwargs.items():
print("{0} = {1}".format(key, value))
# list
def test_var_args(f_arg, *argv):
print("first normal arg:", f_arg)
for arg in argv:
print("another arg through *argv:", arg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment