how to convert this excel formula to python code i have a list with the values from the columns, index 0,1,2 are C1,D1,E1 and index 3 is F1, AI column had some text
E