多值參數(元組和字典)的拆包

什麼是多值參數的拆包?web num_tuple = (1,2,3,4,5) info_dict = {"name": "老王"} #任意定義一個多值函數 def test(*args, **kwargs): print(args) print(kwargs) #1.錯誤的演示 test(num_tuple,info_dict) #2.不使用拆包完成 test(1, 2,
相關文章
相關標籤/搜索