def person(name,age,*,city,sex):
print("name = ",name,"age = ",age,"city = ",city,"sex = ",sex)
from defguanjiancanshu import person
xinxi = person('tom',16,city ='beijing', sex ='man')
print(xinxi)
调试结果:
name = tom age = 16 city = beijing sex = man
None