From 518881c70e18a304ec03e0bf7d7ca99154371272 Mon Sep 17 00:00:00 2001 From: Satwik Kansal Date: Wed, 23 May 2018 18:13:50 +0530 Subject: [PATCH] Correct the snippet in Tic-tac-toe explanation Fixes https://github.com/satwikkansal/wtfpython/issues/81 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 049309c..b333d5e 100644 --- a/README.md +++ b/README.md @@ -530,7 +530,7 @@ And when the `board` is initialized by multiplying the `row`, this is what happe We can avoid this scenario here by not using `row` variable to generate `board`. (Asked in [this](https://github.com/satwikkansal/wtfpython/issues/68) issue). ```py ->>> board = [(['']*3)*3] # board = = [['']*3 for _ in range(3)] +>>> board = [['']*3 for _ in range(3)] >>> board[0][0] = "X" >>> board [['X', '', ''], ['', '', ''], ['', '', '']]