I want to extract a list of lists from a .txt
file. The data in the .txt
file is given like this:
[[[12,34.2,54.1,46.3,12.2],[9.2,63,23.7,42.6,15.2]],
[[12,34.2,54.1,46.3,12.2],[9.2,63,23.7,42.6,15.2]],
[[12,34.2,54.1,46.3,12.2],[9.2,63,23.7,42.6,15.2]]]
I want to store it in a list like:
listA = [[[12,34.2,54.1,46.3,12.2], [9.2,63,23.7,42.6,15.2]], [[12,34.2,54.1,46.3,12.2], [9.2,63,23.7,42.6,15.2]],[[12,34.2,54.1,46.3,12.2], [9.2,63,23.7,42.6,15.2]]]
I tried using the read()
function, but it reads as a string, and I can't seem to find out how to extract what I want.