def update(all_marks, stud_num, mark, column, result):
lines = [l for l in all_marks]
for row in all_marks:
if stud_num in row:
lines[rows][column] = mark
From here, I am trying to replace the value by using lines[rows][column] = mark.
It is supposed to replace the existing value with mark.
But there's a problem with defining rows.
Anyone knows how to fix?
Thanks.
Edit:
Here's sample of data from all_marks:
[['a', '', '', '', '', ''],
['b', '', '', '', '', ''],
['c', '', '', '', '', ''],
['d', '', '', '', '', ''],
['e', '&