I want to generalize this problem: Prove that $\mathbb{R}\setminus \mathbb{Z}$ is open in $\mathbb{R}$.
Let $\mathbb{R}^2 \setminus\mathbb{Z}^2 =\{(x,y)\in \mathbb{R}^2 \mid x \not\in\mathbb{Z}, y\not\in \mathbb{Z}\}.$ Is $\mathbb{R}^2 \setminus\mathbb{Z}^2$ open in $\mathbb{R}^2$?
My attempt: In the problem link I have proved that $\mathbb{R}\setminus \mathbb{Z}$ is open in $\mathbb{R}$. To prove it, I have shown that for each $x\in \mathbb{R}\setminus \mathbb{Z}$ there exists $r>0$ such that $(x-r, x+r)\subset \mathbb{R}\setminus\mathbb{Z}$. Hence $\mathbb{R}\setminus \mathbb{Z}$ is open in $\mathbb{R}$.
Similarly, we can show that for each $y\in \mathbb{R}\setminus\mathbb{Z}$ (considering the $y$ axis) there exists $s>0$ such that $(x-s, x+s)\subset \mathbb{R}\setminus\mathbb{Z}$.
Therefore choose $r^\prime = \frac{1}{2}(\text{min}\{r,s\})$. Let $d$ be the Euclidean metric on $\mathbb{R}^2$. Now for each $(x,y) \in \mathbb{R}^2 \setminus\mathbb{Z}^2$ there exist $r^\prime>0$ such that $B_d((x,y), r^\prime) \subset \mathbb{R}^2 \setminus\mathbb{Z}^2$. So $\mathbb{R}^2 \setminus\mathbb{Z}^2$ is open in $\mathbb{R}^2$.
Is my proof correct?