Return Statement

rantingrick rantingrick at gmail.com
Wed Jan 26 15:40:38 EST 2011


On Jan 26, 2:26 pm, sl33k_ <ahsanbag... at gmail.com> wrote:
> How does "return True" and "return False" affect the execution of the
> calling function?

>>> def f1():
	pass
>>> print f1()
None
>>> def f2():
	return
>>> print f2()
None
>>> def f3():
	return True
>>> print f3()
True
>>> def f4():
	return False
>>> print f4()
False
>>> def f5():
	return 'Strawman'
>>> print f5()
Strawman
...any questions?


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /