I have a file that is made of lines of the following format:-
[123, something, some other thing, "text that i want", more details]
eg:-
[1393349463, u'Tue Feb 25 17:31:03 +0000 2014', 438365537261735936, u'A Falcon character poster for Captain America: The Winter Soldier has swooped in', [], [u'totalfilm'], [u'//1bJdCJ2'], [u'http://pbs.twimg.com/media/BhViUNICQAAoBue.jpg'], 369, 362]
Now i want to read this as list directly into python instead of a string first and then spliting the string by , and joining it back and all because the text section can have a ',' and I dont want to split that.
I am looking for something like this:
with open("input.txt") as fp:
for line in fp:
corpus.append(line[3]) #read only text