Python 函数

创建函数

在 Python 中,函数是使用 def 关键字定义的:

实例

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

相关页面

教程:

术语: