会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Loading
Jun'Blog
博客园
首页
新随笔
联系
订阅
管理
2021年5月26日
关于python中的*args和**kwargs的使用
摘要: 举例说明: 1. 对于列表,字典的解包 # *取列表,元组元素 ls = [1, 2, 3, 4] print(*ls) # **取字典值 dic = {"key1": 1, "key2": 2} print('{key1}, {key2}'.format(**dic)) [注意]:使用**解包时必
阅读全文
posted @ 2021-05-26 10:37 Guang'Jun
阅读(128)
评论(0)
推荐(0)
编辑
公告