Read in file contents to Arrays
<p>I am a bit familiar with Python.  I have a file with information that I need to read in a very specific way.  Below is an example...</p>

<pre><code>1
6
0.714285714286
0    0    1.00000000000
0    1    0.61356352337
...
-1  -1    0.00000000000
0    0    5.13787636499
0    1    0.97147643932
...
-1  -1    0.00000000000
0    0    5.13787636499
0    1    0.97147643932
...
-1  -1    0.00000000000
0 0 0 0   5.13787636499
0 0 0 1   0.97147643932
....
</code></pre>

<p>So every file will have this structure (tab delimited).  </p>

<ul>
<li>The first line must be read in as a variable as well as the second and third lines.  </li>
<li>Next we have four blocks of code separated by a <code>-1   -1   0.0000000000</code>.  Each block of code is 'n' lines long.  The first two numbers represent the position/location that the 3rd number in the line is to be inserted in an array.  Only the unique positions are listed (so, position 0 1 would be the same as 1 0 but that information would not be shown).  </li>
<li>Note: The 4th block of code has a 4-index number.</li>
</ul>

<p><strong>What I need</strong></p>

<ul>
<li>The first 3 lines read in as unique variables</li>
<li>Each block of data read into an array using the first 2 (or 4 ) column of numbers as the array index and the 3rd column as the value being inserted into an array.</li>
<li>Only unique array elements shown.  I need the mirrored position to be filled with the proper value as well (a <code>0 1</code> value should also appear in <code>1 0</code>).</li>
<li>The last block would need to be inserted into a 4-dimensional array.</li>
</ul>
