The classical programming example in Python will print a familiar greeting:
>>> greeting()
Hello world
def greeting():
print "Hello world."
run doctests if called from the command line:
if __name__ == "__main__":
import doctest
doctest.testmod()