Say I have a python program composed of three lines.
if __name__=“__main__”: foo( ) print “Hello” Here, foo( ) is a third-part function that outputs things to the standard output. E.g, foo( ) has only one line print 'I am here'. The point is that I have no permission to change foo() which may contain output statements, and I don't want to mix its output with mine.
Question:
How can I change the third line of the program above (print “Hello”), so that this program
1.only prints “Hello”, and
2.does not print anything from foo( )?
Thanks for your ideas.