Last active
September 16, 2020 08:09
-
-
Save River2056/27b795a1937ba37831b2361b16012e79 to your computer and use it in GitHub Desktop.
This file contains 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
def print_some_names(**kwargs): | |
for key, val in kwargs.items(): | |
print(f'{key}: {val}') | |
# 以下輸出: | |
# students: ['Jack', 'Leon', 'Claire'] | |
# absent: Jill | |
# over_time: True | |
print_some_names(students=['Jack', 'Leon', 'Claire'], absent='Jill', over_time=True) | |
# 以下輸出: | |
# skills: ['Python', 'JavaScript', 'Java'] | |
# user: Kevin | |
print_some_names(skills=['Python', 'JavaScript', 'Java'], user='Kevin') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment