I would like to iterate through two lists simultaneously and write each item from both lists, tab-separated on the same line.
word = [\'run\', \'windless\', \'ma
write only takes one argument as a parameter. To write both variables in the same line, change:
outfile.write(w, p)
such that it is one string with a tab and a newline:
outfile.write("{}\t{}\n".format(w,p))