What exactly does iter_content() function do?
<p>just finished learning web scraping from automate the boring stuff book, but i'm still really confused about iter_content function? what does it actually do?</p>

<p>try to download web page using normal:  </p>

<pre><code>note = open('download.txt', 'w')
note.write(request)
note.close()
</code></pre>

<p>but the result is different from using:</p>

<pre><code>note = open('download.txt', 'wb')
for chunk in request.iter_content(100000):
    note.write(chunk)
note.close()
</code></pre>

<p>???</p>