# Python CodeRecipe|defの使い方

Home Python Keywords

# defの例1

Create and execute a function:

    def my_function():  print("Hello from a function")
    my_function()

# defの定義及び使い方

def関数を使用して、 関数を定義します。

関連ページ 関数の詳細については、Python Functions Tutorialを参照してください。

Home Python Keywords