Would someone review these lines of code and explain me what's wrong? Why do I get the multiply statements error?
listOrigin = [10, -15, 3, 8, 0, 9, -6, 13, -1, 5]
listMask = []
for item in listOrigin:
if item > 0:
listMask.append(1)
elif item < 0:
listMask.append(-1)
else:
listMask.append(0)
print(listOrigin)
print(listMask)
The error is:
SyntaxError: multiple statements found while compiling a single statement