Practice Lab: Decision Tree (exercise 4)

Hello everyone.
In the last exercise (exercise 4), I have written a code that gives the correct answer, but I still get an AssertionError. I saw the hint but as far as I can tell, I am also doing the same procedure in my code.
Any help would be appreciated.
Thank you for your time.
Kind regards,

Hi @Sayed_Aryan_Saeedi, remember only edit the code between ### START CODE HERE ### & ### END CODE HERE ### and please ensure that the indentation is correct. If the error persists, please send me your code so I can assist you.


Your code should only update the best_feature value when Gnew is greater than G. The special case this assert catches is when none of the Gnew values are greater than 0.

@TMosh, thank you for your response. I was storing the values in a list which now that I think of is unnecessary