摘要: 一个最简单的函数 def foods(food): print(food) foods("Strawberry") 结果:Strawberry 其中"food"称为形参,"Strawberry"称为实参 阅读全文
posted @ 2020-03-04 17:00 5444de 阅读(138) 评论(0) 推荐(0) 编辑
摘要: def worker(a, b, c): x = a + b y = x + c return y result = worker(1, 2, 3) print(result)运行结果:6 看代码理解: 你有过一个工人worker,你给他三个参数当作原材料a手机屏,b手机壳,c手机外包装,让他组装手 阅读全文
posted @ 2020-03-04 11:04 5444de 阅读(745) 评论(0) 推荐(0) 编辑