The answer is *yes*, already for an affine variety. The following example is taken by Dimca's book *Singularities and topology of hypersurfaces*, see page 102 and page 105. We work over $\mathbb{C}$. Let $V \subset \mathbb{P}^n$ be a hypersurface and $U:=\mathbb{P}^n \setminus V$ its complement. Since $V$ is very ample, $U$ is an affine variety. Then we have the following > **Proposition.** Assume that $V$ has $k$ irreducible components $V_1, \ldots, V_k$ with $\deg V_i =d_i$. Then $$H_1(U, \mathbb{Z})=\mathbb{Z}^{k-1} \oplus \mathbb{Z}/d \mathbb{Z},$$ where $d$ denotes the greatest common divisor of the $d_i$. > If moreover $V$ has only normal crossing singularities in codimension $1$, then $\pi_1(U)$ is abelian, hence it is isomorphic to the group $H_1(U, \mathbb{Z})$ given above. > In particular, if $V$ is irreducible and normal of degree $d$, one has $$\pi_1(U)=\mathbb{Z}/d \mathbb{Z}.$$