Created
March 6, 2019 06:56
-
-
Save ZhigangPu/a7a96516bdf0846908b03319881493c9 to your computer and use it in GitHub Desktop.
args
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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