title: How to print values separated by spaces instead of new lines in Python 2.7
body: <p>I am using Python 2.7.3 and I am writing a script which prints the hex byte values of any user-defined file. It is working properly with one problem: each of the values is being printed on a new line. Is it possible to print the values with spaces instead of new lines?</p>
  <p>For example, instead of</p>
  <pre><code>61
  
  62
  </code></pre>
  <p>I would like to have <code>61 62</code>.</p>
  <p>Below is my code (<code>..txt</code> is a file which contains the text <code>'abcd'</code>):</p>
  <pre><code>#!usr/bin/python
  import os
  import sys
  import time
  
  filename = raw_input(&quot;Enter directory of the file you want to convert: &quot;)
  
  f = open(filename, 'rb')
  fldt = f.read()
  lnfl = len(fldt)
  print &quot;Length of file is&quot;, lnfl, &quot;bytes. &quot;
  orck = 0
  while orck &lt; lnfl:
      bndt = hex(ord(fldt[orck]))
      bndt = bndt[-2:]
      orck = orck + 1
      ent = chr(13) + chr(10)
      entx = str(ent)
      bndtx = str(bndt)
      bndtx.replace(entx, ' ')
      print bndtx
  </code></pre>