• Calculate Islands BUG !!!

 

Mission is here: https://py.checkio.org/ru/mission/calculate-islands/

My code gives correct result and PyCharm does not show any error, but here is this:

https://prnt.sc/1wy48jc

[9] is correct, why it tells the line 18 has error?

So, do something please, thank you.