Need help in a list

suppose my list is like [["01 April 2055", "20", "20"], ["02 April 2025","5","25"]]. lets have a table
date no. of student cumulative student
1 april 2025 20 20
02 april 2025 5 this should be 20+5=25
03 april 2025 1 26
so how do i do it such that i will get what i described?

Create a new list with the calculations completed, then display this new list in a table.

suppose initially 01 April 2025 20 20
then 03 April 2025 5 25(20+5)
if then i put 02 April 2025 8 then the third column will be 28(20+8) and then
03 April 2025 will be updated cumulative (28+5 = 33)
how do i do it?

like this [["01 April 2025", 20],
["03 April 2025", 5]]

then i add ["02 April 2025", 8]

**final sorted + updated list to become

[["01 April 2025", 20, 20],
["02 April 2025", 8, 28],
["03 April 2025", 5, 33]]

To do this tinydb will be prefer or are you using any google sheet?

Always try this logic.

Before saving the value, first get the existing value if not found make it as 0 or adding value.

If value found add the existing value with current value thens save.

Imagine you are using tinydb with tag name add

  1. Initia local variable with empty list
    Set this variable to Call the add tag value, value not found set it as create empty list
    If the above value is empty list
    Then save the tinydb tav add value make a list 1. Current date 2. Text box text 3 text box text

Else save tinydb tag name add value
Make a list 1. Date 2. Textbox text 3. Text box text + 3rd item of local variable
Then save tinydb add tag, value make a kist