def example(function):
if input() == "Hello there!":
#at this point I want to call the function entered in the tuples
私が何を意味するかの例:Python関数
def example(function):
if input() == "Hello there!":
#do the function here
def Printer(What_to_print):
print(What_to_print + "Just an example")
example(Printer)
このpossibeであり、これをやってであり欠点されていますか?
別の関数の引数として関数を渡すことを意味しますか?はい、可能であり、かなり一般的です。 – bereal
はい、それは完全に可能です。 – Harrison
'この時点で私は関数'を呼びたいと思う。 –