3When buffered output is used, it is not written out immediately but stored in a temporary memory location (a buffer). When the buffer fills, it is automatically flushed to the output stream. If we want to force flushing before the buffer is full, then we have to flush the buffer. There are several methods to flush an output stream os (like os.flush()).