i = 0
loc_file = []
open_file=open('test.txt','r')
file_lines=open_file.readlines()
file = file_lines[0].strip() # First Line
for _ in (file_lines[1]):
exec(f'c{i} = _')
loc_file.append()
i = i + 1
print(loc_file)
I am trying to use variables as they are assigned in as little code as possible, but nothing I have tried to put for
loc_file.append()
has seemed to work.