title: How to generate table using Python
body: <p>Am quite struggling with as I tried many liberary to print table but no sucess so thought to post here</p>
  
  <p>my data is in a text file (resource.txt)</p>
  
  <p>which looks like this (the exact same way it prints)</p>
  
  <pre><code>pipelined  8   8  0  17  0   0
  
  nonpipelined  2 2  0  10  0  0 
  </code></pre>
  
  <p>I want my data print in the following manner </p>
  
  <pre><code>Design name       LUT       Lut as m    Lut as I    FF  DSP   BRAM
  
  pipelined          8          8            0        17  0      0
  
  Non piplined       2          2            0        10  0      0
  </code></pre>
  
  <p>some time data may be more line Colom remain same but rows may increase.</p>
  
  <p>(i have python 2.7 version)</p>
  
  <p>am using this part in my python code all code working but am couldn't able print data which i extracted to text file in tabular form. As i can't use panda liberary as it won't support for python 2.7, but i can use tabulate and all liberary ..can anyone please help me . I tried using tabulate and all but its giving error  </p>
  
  <p>i tried at end simple method to print but its not working (same code works if i put at top of code but at the end of code this wont work..anyone any idea</p>
  
  <pre><code>q11=open( "resource.txt","r")
  for line in q11:
     print(line)
  </code></pre>