title: How do I extract floating point values from .txt file to use for calculation in python?
body: <pre><code>count = 0
  fname = input("Enter file name: ")
  fh = open(fname)
  for line in fh:
      if line.startswith("X-DSPAM-Confidence:") :
          print(line)
          count = count + 1
  print(count)
  </code></pre>
  
  <p>There is a file with 27 lines like X-DSPAM-Confidence :  0.xxxxx, I need to extract the numerical value from each of them to be used for calculations.</p>