So I have a for loop that when printing within the for loop prints exactly what I want since it prints for each line of the txt file. However I want to make all of those printed lines into one variable for use later on in the code.
This is for a scheduling program which I want to be able read from a txt file so that users can edit it through GUI. However since it is a loop, defining it, then printing outside of the loop obviously only prints the last line and I cant figure out a way around it.
with open('schedule.txt') as f:
for line in f:
a,b,c = line.split(',')
print('schedule.every().{}.at("{}").do(job, "{}")'.format(a, b, c))
Output is what I want however I cannot define the whole thing as one variable as needed.