Recently very busy, but still very serious learning python this thing, not for what purpose, just like simply. Recently learned things relatively simple, but also encountered a number of problems, is to compare the problem of confusing people, today's small series here to talk about their understanding of return.
The return statement is a value returned by a function in the Python language, and each function should have a return value, where the return value can be a numeric value, a string, a Boolean value, or a list.
But what is the function of the return statement in Python, and the small part by example for everyone to speak well.
first of all, the Python function returns the value return, the function must have return return value is the complete function, if you do not define the Python function return value, then get a result is None object, and none means no value
Here's an example:
By this two simple contrast, can you see the importance of return? In fact, there is no special use of return, beginners only need to remember the function to have a return value.
A brief analysis of Python's understanding of Return