Doubt on $f: \mathbb{R} \to (0,1) \cup (2,3) $ homeomorphism. A particular annoying question is bothering me. The question is:

Do exist some homeomorphism $f: \mathbb{R} \to (0,1) \cup (2,3) $?

I really need some help. I've already discussed with my professor but all that he says is "use the definition". I don't know what to do anymore.
 A: Hint: If $f$ is a homeomorphism, then $f$ is a bijection and it is continuous. What does each of these two properties in turn mean for $f^{-1}((0,1))$ and $f^{-1}((2,3))$?
A: Assume $f: \mathbb{R} \to (0,1) \cup (2,3)$ is a homeomorphism. Therefore, $f$ must be a continuous bijection.
We know that $\mathbb{R}$ is connected and $(0,1) \cup (2,3)$ is not connected. The image of a connected space is again connected. Since $f$ is bijective and therefore surjective, we see that $f(\mathbb{R}) = (0,1) \cup (2,3)$. We have a contradiction and it follows that $f$ cannot be continuous, so $f$ cannot be a homeomorphism.
A: $f$ is defined on the interval $\mathbb{R}$ and it is continuous there.  Also $f$ is on the set $(0,1)\cup (2,3)$, which means that there are $a,b$ such that $f(a)=1/2$ and $f(b)=5/2$. So $f$ is continous on the interval [a,b] and from calculus it should take all the   numbers between [1/2, 5/2]...but this is  impossible bcs $1$ does not belong to it's range. This proves the statement.
Homomorfism is too strong here... Just continuity and onto is enough.
