a = [0.30, 0.15, 0.0, 0.25, 0.30, 0.0]
b = []
for i in range(a):
if a[i] == 0.00:
b.append(0)
else:
b.append(1)
What I want is to fill b with 0 and 1 according to if the same index in a is equal to or different from zero. Why am I getting the following error: "TypeError: 'list' object cannot be interpreted as an integer"?