TypeError: 'NoneType' object is not subscriptable

I actually solved these problems! I made a lot of mistake in this code. Thanks!