Q10Single correct3 Marks3 Sep 2023
Consider the following code snippet that writes student details to a CSV file named 'scores.csv':
```
def write_to_file(L):
f = open('scores.csv', 'w')
f.write('Name,Python\n')
for i in range(len(L)):
name, marks = L[i]
line = f"{name},{marks}"
if i != len(L) - 1:
line = line + '\n'
f.write(line)
f.close()
L = [('John', 90), ('Jane', 85), ('Michael', 92), ('sarah', 88), ('David', 95)]
```
If the write_to_file(L) function is called with the list L as shown above, what will be the contents of the file 'scores.csv'?
Select the correct option that represents the contents of the 'scores.csv' file after calling the write_to_file(L) function with the provided list L.