「Python」関数内で関数を呼び出すサンプル
書式
def 関数A():
def関数B():
使用例
#関数の定義
def testfunc():
x = 345
#内部関数
def testinnerfunc():
print("value is: ")
print(x)
testinnerfunc()
testfunc()
実行結果
value is:
345
Coding Changes the World
書式
def 関数A():
def関数B():
使用例
#関数の定義
def testfunc():
x = 345
#内部関数
def testinnerfunc():
print("value is: ")
print(x)
testinnerfunc()
testfunc()
実行結果
value is:
345