DIfferent results from an identical numbers

Hi all,

Please could you tell what am I doing wrong. I need to take the index o the minimum item of a list. If the number is between 0-5, it should be zero (0). Thats the reason of the python code.

The problem is in the IndexOf node, that as a result, it gives different indices for the same number in the two cases (image):

import clr
clr.AddReference('ProtoGeometry')
import Autodesk.DesignScript.Geometry
from Autodesk.DesignScript.Geometry import *

clr.AddReference('DSCoreNodes')
from DSCore import *

diferencia = IN[0]

corregido = []
for i in range(len(diferencia)):
	aux = []
	for j in range(len(diferencia[i])):
		if diferencia[i][j] < 5:
			aux.append(0)
		else:
			aux.append(diferencia[i][j])
	corregido.append(aux)
	
OUT = corregido

What am I missing here?

Thanks in advance!

Replace the Python with an if statement code block and see if that works.

A>5? A:0;