I\'m trying to implement some heuristic function in python but the return value is a list instead of float and I can\'t figure why it happens. the heuristic function: