Q:

How to remove double quotation marks from words and numbers in a list

I have 51,823 lines from a .txt file. Each line in the text file looks like this:
"word","word2",number,number2,"number3"

I've stripped and split each line into individual lists that look like this:
['"word"', '"word2"', 'number', 'number2' '"number3"']

All words have double quotation marks and some numbers have double quotation marks. I want to remove all the double quotation marks so my lists looks like this:
['word', 'word2', 'number', 'number2', 'number3']

This is the code:
file = open('somefile.txt', 'r')
data = []
for line in file:
    parts = line.strip().split(',')
    data.append(parts)

How do I remove the double quotation marks before appending to the list?

A:

...
parts = [x.replace('"', '') for x in line.strip().split(',')]
...

