title: Meaning of end='' in the statement print("\t",end='')?
body: <p>This is the function for printing all values in a nested list (taken from Head first with Python).</p>
  
  <pre><code>def printall(the_list, level):
      for x in the_list:
          if isinstance(x, list):
              printall(x, level=level + 1)
          else:
              for tab_stop in range(level):
                  print("\t", end='')
          print(x)
  </code></pre>
  
  <p>The function is working properly.</p>
  
  <p>The function basically prints the values in a list and if there is a nested list then it print it by a tab space.</p>
  
  <p>Just for a better understanding, what does <code>end=' '</code> do?</p>
  
  <p>I am using Python 3.3.5</p>
  
  <p>For 2.7</p>
  
  <pre><code>f =  fi.input( files = 'test2.py', inplace = True, backup = '.bak')
  for line in f:
      if fi.lineno() == 4:
          print line + '\n'
          print 'extra line'
      else:
          print line + '\n'
  </code></pre>
  
  <p>as of 2.6 fileinput does not support with. 
  This code appends 3 more lines and prints the appended text on the 3rd new line. and then appends a further 16 empty lines.</p>