摘要:
1.自定义函数 给函数编写文档: def function(x): "This is function document test." #注意这里没有加入#号,这是函数内的写作方式。 pass#注意下面的语句是function而不是function()。前者表示函数本身,后者表示函数的使用。 pri 阅读全文
摘要:
format_map()传递值到string: #format_map()用于传递字典,与format()不同 phone={"A1":"123","A2":"456"} print("He is phone number is {A1}".format_map(phone)) 使用get()来访问 阅读全文