Python 练习实例34

Python 100例 Python 100例

题目:练习函数调用。

程序分析:使用函数,输出三次 muban99 字符串。

实例

#!/usr/bin/python # -*- coding: UTF-8 -*- def hello_muban99(): print ('muban99') def hello_muban99s(): for i in range(3): hello_muban99() if __name__ == '__main__': hello_muban99s()

以上实例输出结果为:

muban99
muban99
muban99

Python 100例 Python 100例