Question 2
Consider the following code snippet that writes student details to a CSV file named "employees.csv": def save_data(data): f = open('employees.csv', 'w') f.write('Name,Salary\n') for i in range(len(data)): emp, sal = data[i] row = f'{emp},{sal}' if i != len(data) - 1: row = row + '\n' f.write(row) f.close() data = [ ('Alice', 75000), ('Bob', 64000), ('Charlie', 82000), ('Diana', 71000), ('Eve', 69000) ] If the save_data(data) function is called with the list data as shown above, what will be the contents of the file "employees.csv"?
Name,Salary Alice,75000 Bob,64000 Charlie,82000 Diana,71000 Eve,69000
Alice,75000 Bob,64000 Charlie,82000 Diana,71000 Eve,69000
Salary,Name Alice,75000 Bob,64000 Charlie,82000 Diana,71000 Eve,69000
Name Salary Alice,75000 Bob,64000 Charlie,82000 Diana,71000 Eve,69000
Salary,Name 75000,Alice 64000,Bob 82000,Charlie 71000,Diana 69000,Eve