I'm trying to calculate the total number of values above 1.6 in my list of 10,000 numbers. I've tried a few ways:
for value in chi_sq_values:
if value > 1.6:
print(len(value))
gives me the error in my title but the following works
greater = [i for i in chi_sq_values if i > 1.6]
total = len(greater)
print(total)
I want to try two methods to see validate my answer, how can i fix the first one so it works?