How to make Table sort of thing which is in line?
<p>I want to find out the way to keep my table all proper and lined up but when the size of the variable changes, the borders change aswell. Take a look at my code.I need a solution to keep my table straight.</p>

<pre><code>generation = int(input('how many generations do you need?'))
population_calf = int(input('how many calf are there?'))
population_old_cow = int(input('how many old_cow are there?'))
population_cows = int(input('how many cows are there?'))
birth_rate = 1
survival_rate_calf = 0.75
survival_rate_old_cow = 0.25
survival_rate_cows = 0.75


NUMBER = 0
print('              ||   POPULATION calf   |   POPULATION cows   |            POPULATION old_cow  ||')
for i in range(generation):
print('GENERATION', NUMBER, ' '' |','        ', int(population_calf), '                    ', int(population_cows), '                      ', int(population_old_cow),'      ||')
population_old_cow = population_cows * survival_rate_cows +     population_old_cow * survival_rate_old_cow
population_calf = population_cows * survival_rate_cows * birth_rate
population_cows = population_calf * survival_rate_calf
print(int(population_calf), int(population_cows), int(population_old_cow))
NUMBER = NUMBER + 1
</code></pre>

<p>Here is a picture of what it prints out:
<a href="http://i.stack.imgur.com/WLMD9.png" rel="nofollow">Pic of what it prints out</a></p>

<p>THANKS IN ADVANCE GUYS:) IF YOU NEED MORE DETAIL, ASK ME I WILL REPLY CHEERS</p>

<p>You can use formatting in <code>print()</code>:</p>

<pre><code>fmt = '%-15s || %15s | %15s | %18s ||'
print(fmt % ('', 'POPULATION calf', 'POPULATION cows', 'POPULATION old_cow'))
for i in range(generation):
    print(fmt % ('GENERATION %d'%i, int(population_calf), int(population_cows), int(population_old_cow)), end='')
    population_old_cow = population_cows * survival_rate_cows + population_old_cow * survival_rate_old_cow
    population_calf = population_cows * survival_rate_cows * birth_rate
    population_cows = population_calf * survival_rate_calf
    print('', int(population_calf), int(population_cows), int(population_old_cow))
</code></pre>

python python-3.x