侧边栏壁纸
博主头像
cn2linux博主等级

行动起来,活在当下

  • 累计撰写 127 篇文章
  • 累计创建 1 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

草稿:Python 函数传入字典

# Python 3.5+ allows passing multiple sets
# of keyword arguments ("kwargs") to a
# function within a single call, using
# the "**" syntax:

>>> def process_data(a, b, c, d):
>>>    print(a, b, c, d)

>>> x = {'a': 1, 'b': 2}
>>> y = {'c': 3, 'd': 4}

>>> process_data(**x, **y)
1 2 3 4

>>> process_data(**x, c=23, d=42)
1 2 23 42

0
  • ${post.likes!0}

评论区