I am aware that you can flush after a print statement by setting flush=True like so:
flush=True
print("Hello World!", flush=True)