刪除單引號我有一個輸入字符串:從列表在Python
result = '"testing","0.8841","642000.0","80.014521","-60.940653","4522126666","1500854400","","1500842014000","name","80.014521","-60.996532","sampledevice","3","name"'
data = result.split("\n")
i = 0
while i < len(data):
i = i +1
dd = data[i].split(',')
print dd
break
和相應的輸出爲:
[
'"testing"',
'"0.8841"',
'"642000.0"',
'"80.014521"',
'"-60.940653"',
'"4522126666"',
'"1500854400"',
'""',
'"1500842014000"',
'"name"',
'"80.014521"',
'"-60.996532"',
'"sampledevice"',
'"3"',
'"name"'
]
我怎樣才能在列表中的每個元素去掉單引號?
注:'而我
AChampion
謝謝@AChampion –