We are supposed to write file out.
This is what I have and I am still getting an assertion failure:
Here is the assert test:
This is what I have and I am still getting an assertion failure:
1 2 3 4 5 6 |
with open ( 'employee_salaries.tsv' , 'w' ) as f_out: template = '{name},\t{salary}' for row in employee_table: sentence = template. format (name = row[ 0 ], salary = row[ 3 ]) print (sentence) f_out.write(sentence + '\n' ) |
Error:assert open('employee_salaries.tsv').read() == 'NAME\tEMPLOYEE ANNUAL SALARY\nBATEMAN, KELLY ANNE\t$118404.00\nCREMINS, KEVIN M\t$77238.00\nDAVIS, CRAIG W\t$77238.00\nMORENO, JOSE\t$120228.00\nURSETTA, ROSARIO\t$51216.00'
buran write Sep-03-2021, 05:24 PM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.