Need a simple python script to divide a text file (based on the first row)
<p>OK, I should've learned python ages ago, but didn't. Now I need a script to divide a text file into multiple text files.</p>

<p>The output files have to be exactly the same as the input, except they should only contain subsets of the information, based on the values in the first row.</p>

<p>So, if I have a file specifying "Sample1" in the first row, all the columns marked Sample1 should become a new file, the same for "Sample2", "Sample3", etc.</p>

<p>Here's an example of what I mean...</p>

<p>Input file: <a href="https://docs.google.com/open?id=0B9o3EYTdM8lQT0oyZkVVM3RUVUk" rel="nofollow">https://docs.google.com/open?id=0B9o3EYTdM8lQT0oyZkVVM3RUVUk</a></p>

<p>Output: <a href="https://docs.google.com/file/d/0B9o3EYTdM8lQajNoU0JvR0dMSmc/edit?pli=1" rel="nofollow">https://docs.google.com/file/d/0B9o3EYTdM8lQajNoU0JvR0dMSmc/edit?pli=1</a></p>

<p>Any help would be great. Cheers</p>
