Let $L^*$ be the total space of the line bundle $\mathcal{O}_{\mathbb{P}^n}(k)$ minus its zero section.

How can one compute the fundamental group of $L^*$?

For k = 0 the space $L^*$ is $\mathbb{P}^n \times \mathbb{C}^*$ hence $\pi_1(L^*) = \mathbb{Z}$.

For k=-1 the $L^*$ is $\mathbb{C}^{n+1} \setminus \{0\}$, therefore $\pi_1(L^*) = 0$.

What about the other $k$ ?

The long exact sequence of homotopy of a Serre fibration $\mathbb{C}^* \rightarrow L^* \rightarrow \mathbb{P}^n$ gives

$\pi_2(\mathbb{C}^*) = 0 \rightarrow \pi_2(L^*) \rightarrow \pi_2(\mathbb{P}^n) \simeq \mathbb{Z} \rightarrow \pi_1(\mathbb{C}^*)\simeq \mathbb{Z} \rightarrow \pi_1(L^*) \rightarrow \pi_1(\mathbb{P}^n) = 0$.

So one needs to understand the map $\pi_2(\mathbb{P}^n)\rightarrow \pi_1(\mathbb{C}^*)$.