Thanks so much !
I managed to find the patients on time and late,
there I have a list of patients with their states:
ListP = [patient(201, 4, 2, inTime), patient(202, 3, 2, late), patient(203, 2, 3, late), patient(204, 1, 3, late), patient(204 , 1, 4, inTime),patient(203, 2, 4, late), patient(204, 1, 5, inTime),patient(204, 1, 5, inTime)].
I want to have the number of patients in time for the patients classified by their 3rd argument
in the previous example I have
patient(201, 4, 2, inTime), patient(202, 3, 2, late)
so I have only one patient in time and who has as 3rd argument 2, the same thing for other patients and so on…
The result list for the previous example should be:
ResList = [1, 0, 1, 2].