• the last one extra test

Question related to mission Index Power

 

I want to ask that why the if else function in python

why the first picture will pass the test

but the second one wouldn't, and show the index_error

dose it have any difference between these two code?