
import os
import csv

with open('tmp/person_list_input.csv') as csvfile:
    csvreader = csv.reader(csvfile)
    for row in csvreader:
        print """  - role: {}
    name: {}""".format(row[0], row[1])



import os
import csv

with open('tmp/person_list_input.csv') as csvfile:
    csvreader = csv.reader(csvfile)
    for row in csvreader:
        stream = open('tmp/person_list_output.yml', 'a')
        stream.write( """  - role: {}\n    name: {}\n""".format(row[0], row[1])
        )
        stream.close()


Make person list generator output to file
Make person list generator output to file

The console was going beyond the terminal history limit for 14-15

  
  import os
  import csv
  
  with open('tmp/person_list_input.csv') as csvfile:
      csvreader = csv.reader(csvfile)
      for row in csvreader:
-         print """  - role: {}
-     name: {}""".format(row[0], row[1])
+         stream = open('tmp/person_list_output.yml', 'a')
+         stream.write( """  - role: {}\n    name: {}\n""".format(row[0], row[1])
+         )
+         stream.close()
  
  
Make person list generator output to file
## Code Before:

import os
import csv

with open('tmp/person_list_input.csv') as csvfile:
    csvreader = csv.reader(csvfile)
    for row in csvreader:
        print """  - role: {}
    name: {}""".format(row[0], row[1])


## Instruction:
Make person list generator output to file
## Code After:

import os
import csv

with open('tmp/person_list_input.csv') as csvfile:
    csvreader = csv.reader(csvfile)
    for row in csvreader:
        stream = open('tmp/person_list_output.yml', 'a')
        stream.write( """  - role: {}\n    name: {}\n""".format(row[0], row[1])
        )
        stream.close()

