This code was working perfectly a few months back but now it shows Nontype error not subscriptable at line 20... im not able to figure it out, someone please help me