0

I'm creating a verticalized text file like this. Below is the portion of my code that is doing this using zip().

out = zip(word, pos)
outList = list(out)       
print(outList, file=output)

The problem I'm running into is that the format of outList is: ('it', 'PP'), ('was', 'VBD'), ('an', 'DT') How can I get my output to be formatted as verticalized text now that the words and parts of speech are matched up?

smag9467
  • 13
  • 3

1 Answers1

0

You print it. You just can't let Python's automatic formatting do it.

for line in zip(word,pos):
    print( "%10s %s" % line )
Tim Roberts
  • 48,973
  • 4
  • 21
  • 30