title: Comprehension on a nested iterables?
body: <p>I have this nested list:</p>
  
  <pre><code>l = [['40', '20', '10', '30'], ['20', '20', '20', '20', '20', '30', '20'], ['30', '20', '30', '50', '10', '30', '20', '20', '20'], ['100', '100'], ['100', '100', '100', '100', '100'], ['100', '100', '100', '100']]
  </code></pre>
  
  <p>Now, what I want to do is convert each element in a list to float. My solution is this:</p>
  
  <pre><code>newList = []
  for x in l:
    for y in x:
      newList.append(float(y))
  </code></pre>
  
  <p>But can this be done using nested list comprehension, right?</p>
  
  <p>what I've done is:</p>
  
  <pre><code>[float(y) for y in x for x in l]
  </code></pre>
  
  <p>But then the result is bunch of 100's with the sum of 2400.</p>
  
  <p>any solution, an explanation would be much appreciated. Thanks!</p>