I have defined a function using Python as follows:
def output ():
print "Hello, world!"
The default return of the method will be
None. If you perform the following:
res = output()
and print out
res, it will be
None. By default,
None is always returned when not specifying a return.
>>> def output(): ... print "Hello, world!" ... >>> res = output() Hello, world! >>> res >>> type(res) <type 'NoneType'>
However, you will still get something printed to screen, because the