How to print 'tight' dots horizontally in python?
<p>I have a program which prints out its progress to the console.
Every 20 steps, it prints the number of steps like 10 20 30, etc. but within this, it prints a dot. This is printed using the print statement with a comma at the end (<em>python 2.x</em>)</p>

<pre><code>        if epoch % 10 == 0:
            print epoch,
        else:
            print ".",
</code></pre>

<p>Unfortunately, I noticed that the dots are printed apart from each other, like this:</p>

<pre><code>0 . . . . . . . . . 10 . . . . . . . . . 20 . . . . . . . . . 30
</code></pre>

<p>I want this to be tighter, as follows:</p>

<pre><code>0.........10.........20.........30
</code></pre>

<p>In visual basic language, we can get this form if we add a semicolon to the end of the print statement instead of the comma. Is there a similar way to do so in Python, or a walkthrough to get tighter output?</p>

<p><strong>Note:</strong></p>

<p>With all thanks and respect to all who replied, I noticed that some of them considered the change in 'epoch'  happens in a timely manner. Actually, it is not, as it happens after finishing some iterations, which may take from a fraction of second to several minutes.</p>