Hi I am reading lines from a file which has the details of variables that I need to further run my program. The code I am using to read the lines from the file is as follows:
file_name="<file path>/inputPS05.txt"
file=open(file_name)
lines = [line.strip(" \n ''") for line in open(file_name)]
Please refer the screenshot below:
lines[0]
gives a string output which is expected but I want to convert them into variables. How can I achieve that?
I am pulling index items from the list but I am unable to change it to variables and values.