code: def flushed_print(*args, **kwargs):
      
      print(*args, **kwargs)
      file = kwargs.get('file', sys.stdout)
      file.flush() if file is not None else sys.stdout.flush()
docs: Use to replace print(*args, flush=True) that doesn't exist for python<3.3