title: Stripping list brackets and replacing commas with spaces
body: <p>It is my understanding that the <code>re</code> library only works for strings, while I have a list. The reason I ask is because I'm trying to convert this Python output to be compatible with r. Here's what I'm trying to do:</p>
  
  <pre><code>list = [1, 2, 3, 4]
  1 2 3 4
  </code></pre>
  
  <p>What's tripping me up here is that I can't just say <code>output = 1 2 3 4</code>. I was thinking about trying to get around this by writing to file or something, but I don't know how to get my preferred output in the first place. Could someone please help me out? Thanks.</p>