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()
上の例の出力は、次のとおりです。
hello world hello world hello world