BILINGUAL WORD CARD · RANK 42

def

🏗️ Keyword to define a new function in Python

Defines a function in Python.

中文对照 · Chinese

🏗️ 给新榨汁机贴上制作说明书

在 Python 中用 `def 函数名(参数):` 来创建自己的函数。

Code example

def area(r):
    return 3.14 * r * r
Explore 100 bilingual word cards →