I’m working on a script to filter a list of values with two conditions, but it doesn’t work. The list has values equal to 1 and -1, the idea is a script that returns True if the value is equal to them and false if it is different.
Can someone help me to find what is the error?
List = [0]
result = []
for i in List:
if i == 1:
result.append(True)
elif i ==-1:
result.append(True)
else:
result.append(False)
# Assign your output to the OUT variable.
OUT = result