2017-02-27 関数の基礎 Python3 入門Python3 4.6.3 defで関数を定義することが出来ます。 def foo(i): return 2 + i print(foo(100)) $ py main.py 102戻り値を返さない場合nullが返ります def foo(): print(1) print(foo()) $ py main.py 1 None