Home  >  Article  >  Backend Development  >  What does def in python mean?

What does def in python mean?

步履不停
步履不停Original
2019-07-03 14:06:1837494browse

What does def in python mean?

define means, used to define functions.

For example:

def Function name (parameter 1, parameter 2, ..., parameter N): Execution statement

# 例:简单的函数使用
# 定义函数
def hello():
    print 'hello python!'
     
# 调用函数        
hello()

>>> hello python!

Recommended related tutorials: Python video tutorial

The above is the detailed content of What does def in python mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn