How to fix NameError: name 'variable' is not defined in Python | DevErrors