I have a data in the file something like the following:
[['1','1','abc'],['2','2','pqr'],['3','3','xyz']]
I am trying to load this data as it is in the list variable.
with open('abc.txt') as d:
text = d.readlines()
I got the following output:
>>> text
["[['1','1','abc'],['2','2','pqr'],['3','3','xyz']]"]
Then I tried the command text = d.read()
I got the following result:
"[['1','1','abc'],['2','2','pqr'],['3','3','xyz']]"
I am trying to achieve the output as:
>>> text
[['1','1','abc'],['2','2','pqr'],['3','3','xyz']]
Kindly, guide me to fulfill what I want to.