How to zip up files of same prefix in python?
<p>If I have a directory "C:\Files" that contains a bunch of files:</p>

<p>A_File1
A_File2
B_File1
B_File2</p>

<p>What is the best way to iterate through the files to zip up any file with the same prefix into a single zip file? For instance, output would be "A.zip" and "B.zip" and their associated files.</p>

<p>I know how to iterate through the files:</p>

<pre><code>for item in os.listdir("C:\FILES"):
</code></pre>

<p>But I do not know what the best way to zip up the files is or if there is some python library that helps with that.</p>
