ziming-liu
6/17/2019 - 9:46 AM

python关键字传参.md

#用两个星号表示关键字参数 def person_info(name, age, **kw): print("name", name, "age", age, "other", kw)

person_info("Xiaoming", 12) name Xiaoming age 12 other{} person_info("Dahuang", 35, city = "Beijing") name Dahuang age 35 other {'city':'Beijing'}12345678