Is simply connectedness preserved after deleting a high codimension set Suppose $X$ is a complex manifold of complex dimension $n$, $Z$ is a subvariety of complex codimension at least $2$. Suppose $\pi_1(X)=0$, do we have $\pi_1(X-Z)=0$? Do we have $\pi_1(X-Z)=\pi_1(X)$ in general?
 A: Let $X$ be a real $n$-manifold, $M$ a real $k$-manifold, $Z$ a submanifold of $X$ of codimension at least $k+2$. (Actually you can replace $Z$ by $f(Z)$, where $f: Z \to X$ is any smooth map, not just an embedding).
Then the inclusion $X-Z \hookrightarrow X$ induces a bijection $[M,X-Z] \to [M,X]$.
Invoke the transversality theorem: surjectivity follows because if $g: M \to X$ is some smooth map, we may homotope it to be transverse to $Z$; because of the dimensions involved a map $g: M \to X$ transverse to $Z$ must miss $Z$ entirely. Note that all we use here is that $Z$ is codimension at least $k+1$; indeed if $Z$ is codimension $k+1$ the map $[M,X-Z] \to [M,X]$ is surjective, though not necessarily a bijection.
For injectivity invoke transversality again, this time applied to $g_t: M \times I \to X$, while assuming that $g_0, g_1$ both miss $Z$. One version of the transversality theorem then says that this may be homotoped while fixing the boundary $\partial g_t: M \times \{0,1\} \to X$ to a map transverse to $Z$. Again invoking the dimensions the new homotopy $g'_t: M \times I \to X$ must miss $Z$ as desired.
It takes only a slight modification to do the above for basepointed homotopy classes of basepointed maps. This is what you need to prove that if $Z$ is codimension at least $k+2$, then $\pi_k(X-Z) \to \pi_k(X)$ is an isomorphism. Specializing to $k=1$ gives the result you want.
