the code of my program is here: Why am I getting this error "NameError:name 'self' is not defined."
The error I get is the following:
Traceback (most recent call last):
File "sudoku_maker.py", line 51, in <module>
p.main()
File "sudoku_maker.py", line 44, in main
self.createEasy()
File "sudoku_maker.py", line 16, in createEasy
if (self.puzzle[i][j] != 0):
AttributeError: 'Puzzle' object has no attribute 'puzzle'
The only reason I could see why this error is happening is because the list is only declared in the init function but I put it in there because I saw another answer on here that said to do it that way. I was gonna comment on the answer saying asking how to do that for class variable but I didn't have enough rep and then I found another question where the answerer said to only declare a list in the init function.