I'm an absolute beginner to Python and programming in general and I have just had my first exposure to functions.
I have define two simple functions below:
def output1():
print "Hello, world!"
def output2():
print "Hello, there!"
output1()
output2()
Having saved the above to a script called function.py, I then use the windows power shell to run the script, and it prints the following as you would expect:
Hello, world!
Hello, there!
However when I amend the script to:
def output1():
print "Hello, world!"
def output2():
print "Hello, there!"
print output1()
print output2()
It prints:
Hello, world!
None
Hello, there!
None
Out of curiosity why does it do this when I prefix output1 and output2 with print?