title: Splitting strings within nested lists in Python and converting to float?
body: <p>I am trying to split my nested list of strings into nested lists of floats. My nested list is below:</p>
  <pre><code>nested = [['0.3, 0.4, 0.2', '0.5, 0.1, 0.3'], ['0.7, 0.4, 0.2'], ['0.4, 0.1, 0.3']]
  </code></pre>
  <p>My desired output would be a nested list where these values remain in their sublist and are converted to floats as seen below:</p>
  <pre><code>nested = [[0.3, 0.4, 0.2, 0.5, 0.1, 0.3], [0.7, 0.4, 0.2], [0.4, 0.1, 0.3]]
  </code></pre>
  <p>The difficulty has come when trying to handle sublists with multiple strings (I.e. the first element). I have found some examples such as here <a href="https://stackoverflow.com/questions/29002067/how-do-i-split-strings-within-nested-lists-in-python">How do I split strings within nested lists in Python?</a>, but this code only handles sublists with one string element and I'm unsure how to apply this to sublists with multiple strings.</p>
  <p>I am trying to avoid hardcoding anything as this is part of a script for a larger dataset and the sublist length may vary.</p>
  <p>If anyone has any ideas, I'd appreciate some help.</p>