I have defined some constant in my python code. Those constants are the following :
pairs = (
(0.0, 0.25, 0.2, 0.30),
(0.25, 0.5, 0.35, 0.45),
(0.5, 0.75, 0.5, 0.6),
(0.75, 1.0, 0.65, 0.75)
)
I want to put those constants in text file and read them from my code. How is it possible to do so? How can I read in exact the same way those constants?
EDIT: I tried to read the variables using the following code:
with open ("test.txt", "r") as myfile:
data=myfile.readlines()
However it does not produce the desired output.