Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- row = [' ', ' ', ' ']
- matrix = [row, row, row] # the problem is 3 of same row
- print(matrix)
- matrix[0][0] = 'X'
- print(matrix)
- print()
- matrix = [[' ', ' ', ' '], [' ', ' ', ' '], [' ', ' ', ' ']] # 3 different rows
- print(matrix)
- matrix[0][0] = 'X'
- print(matrix)
Advertisement
Add Comment
Please, Sign In to add comment