The function returns None
if it does not return anything else, hence you first print inside the function and then you print the None
that was returned.
If you either exchange your print
statements with return
or just call the_flying_circus()
instead of print the_flying_circus()
you will get the expected result.
def the_flying_circus():
if True and True and True and not False:
return "Kevin stinkt"
elif 10 < 4:
return "Justin stinkt"
else:
return "herb-wuerzig"
Then you can run the function and print the returned value:
print the_flying_circus()
Or you can do:
def the_flying_circus():
if True and True and True and not False:
print "Kevin stinkt"
elif 10 < 4:
print "Justin stinkt"
else:
print "herb-wuerzig"
And just call the function without printing the returned value:
the_flying_circus()