I have a .txt document with this type of text:
[(“Vazhdo”,”verb”),(“të”,”particle”),(“ecësh”,”verb”),(“!”,”excl.”)]
(which represents a sentence and the Parts of Speech tags for each word)
I want to have a list of list in python, like this:
[[(“Vazhdo”,”verb”),(“të”,”particle”),(“ecësh”,”verb”),(“!”,”excl.”)]]
But I obtain this:
['[(“Vazhdo”,”verb”),(“të”,”particle”),(“ecësh”,”verb”),(“!”,”excl.”)]\n']
The code I'm using is:
import io
f=io.open("test.txt", mode="r", encoding="utf-8-sig")
f_list = list(f)
How can I avoid the ['[ .... ]\n'] ?
Thank you!