Title is pretty self-explanatory. Currently I have:
with open('dwarf_fort.txt') as f:
for minerals in f:
mining_rig()
I need it to go from 'dwarf_fort.txt', execute the program and append the output into a new file. What am I missing here? Thank you.