python-函数

1. 什么是函数? 同数学中的函数,无非是输入-->处理-->输出。 2. 使用函数的好处? (1)可以重复调用,减少重复代码; (2)封装好,使用接口即可; (3)程序模块化。 3. Python具有内置函数,如:input()、print()、len()、range()等等。还允许自定义函数。
posted @ 2020-09-30 11:42  cold_moon  阅读(68)  评论(0编辑  收藏  举报