How to fix TypeError: 'type' object is not subscriptable (use list[int] requires Python 3.9+) in Python | DevErrors