Background:
I have a string SourceString
which is comma separated floating numbers returned by an instrument. Printing it shows this:
"364.3889926095051E-3,15.0529859951886E+3,29.5266606165309E+3,148.7897394963915E+3,1.0681575514441E+6"
Next, in order to extract individual floating numbers, I convert it to a list using this code:
Readback_list=SourceString.split(",")
Printing Readback_list
displays the resultant list as:
['"364.3889926095051E-3', '15.0529859951886E+3', '29.5266606165309E+3', '148.7897394963915E+3', '1.0681575514441E+6"\n']
Question:
When I print individual elements of this list, I see that the first and last elements have a "
in the output shown in attached photo.
- How to remove the
"
from these elements? - I am unsure why is split() not getting rid of the
"
by itself.