title: Pyserial: How to write and read list of float
body: <p>I have a list of float:</p>
  
  <pre><code>[0, 0, 0.8125, 0.2421875, -0.939453125, 0.60888671875, 0.3944091796875]
  </code></pre>
  
  <p>but <code>ser.write(...)</code> and <code>ser.read(...)</code> can do with string data</p>
  
  <p>I think I must map a list of float to a string of list of float.</p>
  
  <p>like this:</p>
  
  <pre><code>'[0, 0, 0.8125, 0.2421875, -0.939453125, 0.60888671875, 0.3944091796875]'
  </code></pre>
  
  <p><strong>My Question: What code to map it?</strong></p>
  
  <p>so now we can write or read this thing, and then it map back to list of float again.</p>