How to fix TypeError: 'tuple' object does not support item assignment in Python | DevErrors