I have a saved file in the form of lists,
[-17.43351952][-3.3481323][-17.43351952][-0.10026689][-0.10026689]
now i want to open the file and use it's values for doing some Arithmetic operations.
when i call it , it comes as one single unit (as a string '' ), without separation of any commas.
i tried but it didn't worked.
with open('text_file.txt') as f:
data = f.read().replace(" ", ",")
print(data)
i also tried using split function, but 'list' object has no attribute 'split'
desired output
` [-17.43351952], [-3.3481323], [-17.43351952], [-0.10026689], [-0.10026689]
`