Why print command gives a new line even though there is no data to print
<p>Just typing <code>print</code> only gives newline in python.  Typing <code>print</code> without the brackets in 3.x will also gives a newline. Why?</p>

<p>Because <a href="https://docs.python.org/3/library/functions.html#print">the documentation</a> says so</p>

<blockquote>
  <p><code>print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)</code></p>
  
  <p>Print objects to the text stream file, separated by sep and followed by end. sep, end and file, if present, must be given as keyword arguments.</p>
  
  <p>All non-keyword arguments are converted to strings like str() does and written to the stream, separated by sep and followed by end. Both sep and end must be strings; they can also be None, which means to use the default values. <strong>If no objects are given, <code>print()</code> will just write <code>end</code>.</strong></p>
  
  <p>The file argument must be an object with a write(string) method; if it is not present or None, sys.stdout will be used. Since printed arguments are converted to text strings, print() cannot be used with binary mode file objects. For these, use file.write(...) instead.</p>
  
  <p>Whether output is buffered is usually determined by file, but if the flush keyword argument is true, the stream is forcibly flushed.</p>
  
  <p>Changed in version 3.3: Added the flush keyword argument.</p>
</blockquote>

<p>Note that <code>end</code> is defaulted to <code>'\n'</code> which is a new line.</p>

python python-2.7 python-3.x