title: How to parse data in a variable length delimited file?
body: <p>I have a text file which does not confirm to standards. So I know the (end,start) positions of each column value. </p>
  
  <p>Sample text file :</p>
  
  <pre><code>#     #   #   #
  Techy Inn Val NJ
  </code></pre>
  
  <p>Found the position of # using this code :</p>
  
  <pre><code>  1 f = open('sample.txt', 'r')
    2 i = 0
    3 positions = []
    4 for line in f:
    5     if line.find('#') &gt; 0:
    6         print line
    7         for each in line:
    8             i += 1
    9             if each == '#':
   10                 positions.append(i)
  </code></pre>
  
  <p>1     7   11  15  => Positions</p>
  
  <p>So far, so good! Now, how do I fetch the values from each row based on the positions I fetched? I am trying to construct an efficient loop but any pointers are greatly appreciated guys! Thanks (:</p>