I am trying to read an array from file which I made earlier and then assign it to variable. But now i ran into a problem. When i assigned that file content to variable, it became string instead of array. how do i convert that back to an array ?
file.txt content:
[(0, 0.2, ),(0, 0.1, ),(0.2, 0.2, ),(0.2, 0.2, ),(0.4, 0.2, ),]
my code:
valid_outputs = f=open("fileName.txt","r")
if(f.mode == 'r'):
valid_outputs = f.read()