Return Statement

Ben Finney ben+python at benfinney.id.au
Wed Jan 26 16:51:55 EST 2011


sl33k_ <ahsanbagwan at gmail.com> writes:

> How does "return True" and "return False" affect the execution of the
> calling function?

The object ‘True’, or the object ‘False’, is returned to the calling
statement, and the function call evaluates to that return value.

That may sound facetious, but it's as specific as I can be without
knowing what aspect of the return semantics are confusing you.

You will probably find great benefit in working through the entire
Python tutorial <URL:http://docs.python.org/tutorial/>. Not just read,
but *do*: perform each example, experiment with each section until you
understand it, and only then go on.

-- 
 \     “Ladies, leave your clothes here and spend the afternoon having |
  `\                                      a good time.” —laundry, Rome |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list