We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e703923 commit 4a1b1cfCopy full SHA for 4a1b1cf
src/python/katas/py6kyu/connect_four_placing_tokens.py
@@ -0,0 +1,10 @@
1
+"""Kata url: https://www.codewars.com/kata/5864f90473bd9c4b47000057."""
2
+
3
+def connect_four_place(columns):
4
+ board = [[] for _ in range(7)]
5
6
+ for turn, col in enumerate(columns):
7
+ board[col].append("YR"[turn & 1])
8
9
+ final_board = [''.join(col).ljust(6, '-') for col in board]
10
+ return [[*l] for l in zip(*final_board)][::-1]
0 commit comments