Mar-23-2021, 03:49 PM
Sorry for populating the forum. However, I need some advice.
My below data is stored in the lists.
I would like to do calculations on the base of the order. For example: T1=Maths[0]+English[1]+History[2]+Acade[3]+Sport[0]
This calculation should be done for T2, T3 and T4.
I can do with lots of if-elif but I would like to know if there is a better way.
My below data is stored in the lists.
I would like to do calculations on the base of the order. For example: T1=Maths[0]+English[1]+History[2]+Acade[3]+Sport[0]
This calculation should be done for T2, T3 and T4.
I can do with lots of if-elif but I would like to know if there is a better way.
Output:Maths [6, 7, 8, 5]
English [9, 9, 8, 7]
History [6, 6, 7, 8]
Acade [9, 9, 8, 7]
Sport [6, 6, 7, 8]
----------------------------------------
T1 T2 T3 T4
order for Maths ['A', 'B', 'C', 'D']
order for English ['B', 'C', 'D', 'A']
order for History ['C', 'D', 'A', 'B']
order for Academic ['D', 'C', 'B', 'A']
order for Sports ['A', 'B', 'C', 'D']