What does it mean to flush file contents in Python?
<p>I am trying to teach myself Python by reading documentation. I am trying to understand what it means to flush a file buffer. According to documentation, "file.flush" does the following.</p>

<pre><code>Flush the internal buffer, like stdio‘s fflush().
This may be a no-op on some file-like objects.
</code></pre>

<p>I don't know what "internal buffer" and "no-op" mean, but I think it says that <code>flush</code> writes data from some buffer to a file.</p>

<p>Hence, I ran this file toggling the pound sign in the line in the middle.</p>

<pre><code>with open("myFile.txt", "w+") as file:
    file.write("foo")
    file.write("bar")
    # file.flush()
    file.write("baz")
    file.write("quux")
</code></pre>

<p>However, I seem to get the same <code>myFile.txt</code> with and without the call to <code>file.flush()</code>. What effect does <code>file.flush()</code> have?</p>
