iterating over first i . e 0 th column and connecting Node .
elif i <= n - 1 and j == 0 : NEW_LINE INDENT i = i - 1 NEW_LINE temp . top = Node ( grid [ i ] [ j ] ) NEW_LINE temp = temp . top NEW_LINE if i == 1 : NEW_LINE INDENT temp . top = self . head NEW_LINE DEDENT DEDENT