Why does it say that there isn’t an element which is there? /u/TheReddieRed Python Education

if len(self.marked) > 0: x1 = self.marked[0][0] y1 = self.marked[0][1] print(x1,y1) print(self.marked[0][0]) print(self.marked[0][1]) self.marked.remove(self.marked[0][0]) self.marked.remove(self.marked[0][1]) else: break Terminal response - Hello from the pygame community. https://www.pygame.org/contribute.html 10 4 10 4 Traceback (most recent call last): File "e: - Copy (2)minesweeper copy.py", line 115, in <module> board.click(click) File "e: - Copy (2)minesweeper copy.py", line 76, in click self.marked.remove(self.marked[0][0]) ValueError: list.remove(x): x not in list 

submitted by /u/TheReddieRed
[link] [comments]

​r/learnpython if len(self.marked) > 0: x1 = self.marked[0][0] y1 = self.marked[0][1] print(x1,y1) print(self.marked[0][0]) print(self.marked[0][1]) self.marked.remove(self.marked[0][0]) self.marked.remove(self.marked[0][1]) else: break Terminal response – Hello from the pygame community. https://www.pygame.org/contribute.html 10 4 10 4 Traceback (most recent call last): File “e: – Copy (2)minesweeper copy.py”, line 115, in <module> board.click(click) File “e: – Copy (2)minesweeper copy.py”, line 76, in click self.marked.remove(self.marked[0][0]) ValueError: list.remove(x): x not in list submitted by /u/TheReddieRed [link] [comments] 

if len(self.marked) > 0: x1 = self.marked[0][0] y1 = self.marked[0][1] print(x1,y1) print(self.marked[0][0]) print(self.marked[0][1]) self.marked.remove(self.marked[0][0]) self.marked.remove(self.marked[0][1]) else: break Terminal response - Hello from the pygame community. https://www.pygame.org/contribute.html 10 4 10 4 Traceback (most recent call last): File "e: - Copy (2)minesweeper copy.py", line 115, in <module> board.click(click) File "e: - Copy (2)minesweeper copy.py", line 76, in click self.marked.remove(self.marked[0][0]) ValueError: list.remove(x): x not in list 

submitted by /u/TheReddieRed
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *