What is the fundamental group of $\mathcal O_{\mathbb P^n}(k)$ minus the zero section
The fibration $\mathbb{C}^\times\to L^\times\to\mathbb{P}^n$ can be "delooped" to a fibration $L^\ast \to\mathbb{P}^n\to{\rm B}\mathbb{C}^\times$ where the last map is the classifying map for the line bundle. Now we have ${\rm B}\mathbb{C}^\times\cong\mathbb{P}^\infty$, and we want to identify the map $\pi_2(\mathbb{P}^n)\to\pi_2(\mathbb{P}^\infty)\cong\pi_1(\mathbb{C}^\times)$ induced by the classifying map for $\mathcal{O}(k)$. Note that the generator for $\pi_2(\mathbb{P}^\infty)$ is given by the natural inclusion $\mathbb{P}^1\to\mathbb{P}^\infty$ classifying $\mathcal{O}(1)$. In particular, the map $\pi_2(\mathbb{P}^n)\to\pi_2(\mathbb{P}^\infty)$ classifying $\mathcal{O}(k)$ must be multiplication by $k$. Of course, the result is the same as in Jason Starr's comments. Just another funny way to see it.
Another way to see that the fundamental group is $\mathbb{Z}/k$ is using geometry of cyclic quotient singularities and it goes as follows.
We consider the negative twists first. In this case the total space $\mathcal{O}_{\mathbb{P}^n}(-k)$ is the resolution of singularities of the quotient space $\mathbb{C}^{n+1} / G$ with $G=\mathbb{Z}/k$ acting diagonally by $k$-th roots of unity. To see this one computes the coordinate algebra of the quotient which is precisely the affine cone over the degree $k$ Veronese embedding of $\mathbb{P}^n$. Now the latter cone is resolved by a single blow up of its vertex and the resulting space is the total space $\mathcal{O}_{\mathbb{P}^n}(-k)$.
In particular the complement to the zero section of $\mathcal{O}(-k)$ is isomorphic to the punctured cone $(\mathbb{C}^{n+1} - 0) / G$, and so has fundamental group isomorphic to $G$ as $\mathbb{C}^{n+1} - 0$ is simply-connected.
Now if the twist was positive, contracting zero section is impossible, but replacing $k$ by $-k$ makes a homeomorphic space, so it is $\mathbb{Z}/k$ in both cases; and the answer is $\mathbb{Z}$ for $k=0$ as the bundle is trivial then.