Find the kth node from beginning of linked list . We also find previous of kth node because we need to update next pointer of the previous .
x = self . head NEW_LINE x_prev = Node ( None ) NEW_LINE for i in range ( k - 1 ) : NEW_LINE INDENT x_prev = x NEW_LINE x = x . next NEW_LINE DEDENT