title: python - converting objects to float in list of lists
body: <p>I'm trying to make a program in Python 3 where user gives multiple values in one input separated by space and these values are added to a list in form of a list, thus creating a list of lists. But I just cant convert these values to float.</p>
  
  <p>This is the "base" of the code:</p>
  
  <pre><code>lst = []
  ln = input()
  values = ln.split(" ")
  lst.extend([values])
  while ln != "":
      ln = input()
      values = ln.split(" ")
      lst.extend([values])
  </code></pre>
  
  <p>Which would give me list like this</p>
  
  <pre><code>[['1', '2'], ['3', '4']]
  </code></pre>
  
  <p>So the problem is that I cannot convert these strings to floats. One of the ways I've tried is </p>
  
  <pre><code>for i in lst:
      for j in i:
          j = float(j)
  </code></pre>
  
  <p>Which just gives me <code>"ValueError: could not convert string to float:"</code>. I've also tried mapping but that doesn't work either.</p>