Skip to content
This repository was archived by the owner on Aug 11, 2023. It is now read-only.

Commit 330c34c

Browse files
committed
Update
1 parent bb3f95c commit 330c34c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lessons/python/exercises/exercise-general-week-08-012--04.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ def check_winner():
6363
while True:
6464
i = int(input(f"Enter 1-9: "))
6565
if i >= 1 and i <= 9:
66-
D[L[i-1]][i-1] = p1
67-
L[i-1] -= 1
66+
idx=i-1
67+
D[L[idx]][idx] = p1
68+
L[idx] -= 1
6869
p1, p2 = p2, p1
6970
show()
7071
check_winner()

0 commit comments

Comments
 (0)