Python 练习范例 34
练习函数调用
#!/usr/bin/python # -*- coding: UTF-8 -*- def hello_world(): print 'hello world' def three_hellos(): for i in range(3): hello_world() if __name__ == '__main__': three_hellos()
以上 Python 代码输出结果如下
hello world hello world hello world