title: Python: String will not convert to float
body: <p>I wrote this program up a few hours ago:</p>
  
  <pre class="lang-python prettyprint-override"><code>while True:
      print 'What would you like me to double?'
      line = raw_input('&gt; ')
      if line == 'done':
          break
      else:
          float(line)              #doesn't seem to work. Why?
          result = line*2
          print type(line)         #prints as string?
          print type(result)       #prints as string?
          print " Entered value times two is ", result
  
  print 'Done! Enter to close'
  </code></pre>
  
  <p>As far as I can tell, it should be working fine.The issue is that when I input a value, for example 6, I receive 66 instead of 12. It seems like this portion of code:</p>
  
  <pre class="lang-python prettyprint-override"><code>float(line)
  </code></pre>
  
  <p>is not working and is treating line as a string instead of a floating point number. I've only been doing python for a day, so its probably a rookie mistake. Thanks for your help!</p>