Let $A_n = \{1/n\} \times [-n,n]$, when $n \in \Bbb N$. Show that the subset $$X=\Bbb R^2 \setminus \left( \bigcup_{n \in \Bbb N} A_n \right)$$ is connected.
Usually these connectedness problems are solved by showing path-connectedness or assuming the contrary. In this case I'm quite sure the space isn't path-connected as there is no way to get a path to the origin from any point $(x,y)$ when $x >0$.
Assuming the contrary that $X = A \cup B$ where $A , B$ are closed in $\Bbb R^2$ and $A \cap B= \emptyset$. I should be able to figure out to find a contradiction from here, but I don't see it. This reminds me of the topologist's sine curve as the slices will start to oscillate very quickly near the origin, but I cannot get any data to work form these "slices". My idea was to assume wlog that the origin is in $A$ and then try to find something useful from there, but I don't now what conclusions I can draw from here. May I have some hints on what to consider?
Let $X^+=\{(x,y)\in X:x>0\}$ and $X^-=\{(x,y)\in X:x<0\}$ and $X^0=\{0\}\times\Bbb R.$
Suppose $C,D$ are disjoint open subsets of $X$ with $C\cup D=X.$ Now each of $X^+,X^-, X^0$ is a connected subspace of $X$ so each of them is a subset of $C$ or a subset of $D.$ So WLOG let $X^0\subset C.$ But an open set that covers $X^0$ cannot be disjoint from $X^+$ nor disjoint from $X^-.$ So neither $X^+$ nor $X^-$ can be a subset of $D.$
Your suspicion that $X$ is not path-connected is correct.