Tools, FAQ, Tutorials:
What Is Function
What Is Function in Python?
✍: FYIcenter.com
A function, also called a method, in Python is a statement block waiting to be executed later
with a function call expression.
A function can have the following elements:
Here is an example of a simple function definition statement block and a calling statement:
>>> def hello(name):
... return "Hello "+name
...
>>> msg = hello("World")
>>> msg
'Hello World'
Note that in the Interactive mode, Python changes the prompt to "..." if the statement is not completed in the previous line.
⇒ 'def' - Function Definition Statements
⇐ Defining Functions in Python
2017-09-12, ∼2275🔥, 0💬
Popular Posts:
How to send an FTP request with the urllib.request.urlopen() function? If an FTP server supports ano...
How to read RSS validation errors at w3.org? If your RSS feed has errors, the RSS validator at w3.or...
How To Change Text Fonts for Some Parts of a Paragraph? If you want to change text fonts or colors f...
How to use 'choose ... when ..." policy statements to control execution flows? If you want to contro...
How To Use an Array as a Queue in PHP? A queue is a simple data structure that manages data elements...