I have an if-statement that is shown below and I want to know, for the 4 variables that I am checking to see if the corresponding column in my file has the word 'TRUE' in it, how can I get python to output which exact variable that the if-statement is valid for?
For example: if the first row in my data set (which is a spreadsheet by the way) has the word 'true' in it for the variable A and 'false' for the rest, then my if-statement will be valid for that variable during that particular iteration of the loop. So, in that case, I want python to print out that it is variable "A", and so on for each iteration of the loop. How can I get the program to do that?
for x in range(1,len(column)):
if A[x] or B[x] or C[x] or D[x] == "TRUE":
# here I want to print out whichever variable the 'true' corresponds to