Can Python remove double quotes from a string?
<p>I have some text file like this, with several 5000 lines:</p>

<pre><code>5.6  4.5  6.8  "6.5" (new line)
5.4  8.3  1.2  "9.3" (new line)
</code></pre>

<p>so the last term is a number between double quotes.</p>

<p>What I want to do is, using Python (if possible), to assign the four columns to double variables. But the main problem is the last term, I found no way of removing the double quotes to the number, is it possible in linux?</p>

<p>This is what I tried:</p>

<pre><code>#!/usr/bin/python

import os,sys,re,string,array

name=sys.argv[1]
infile = open(name,"r")

cont = 0
while 1:
         line = infile.readline()
         if not line: break
         l = re.split("\s+",string.strip(line)).replace('\"','')
     cont = cont +1
     a = l[0]
     b = l[1]
     c = l[2]
     d = l[3]
</code></pre>
