阅读量:132
是的,Python的print()函数可以打印函数。你可以将函数名作为字符串传递给print()函数,然后调用该函数。例如:
def my_function():
print("Hello, world!")
print("Calling the function:")
my_function()
输出:
Calling the function:
Hello, world!