For topological spaces $X,Y$ let $\text{Cont}(X,Y)$ be the collection of continuous functions $f:X\to Y.$ We endow $\text{Cont}(X,Y)$ with the topology inherited from the product topology on $Y^X.$


Are there spaces $X,Y$ such that $X$ has more than one point and $Y\not\cong\mathbb{R}$ such that $\mathbb{R}\cong\text{Cont}(X,Y)$?



Is $\mathbb{R}\cong\text{Cont}(X,Y)$ for some non-trivial spaces $X,Y$?
I must admit that I hesitated answering this question, but here it is.


The answer is "no".
Assume there exist topological spaces $X$ and $Y$ such that $C(X,Y)\simeq \mathbb{R}$ and $Y\not\simeq\mathbb{R}$.
Identifying $C(X,Y)$ with $\mathbb{R}$ and $Y$ with the constant functions in $Y^X$ we consider $Y$ as a closed subsapce of $\mathbb{R}$. Considering the surjection $\mathbb{R} \to C(X,Y)\to C(\{x\},Y) \to Y$, we see that $Y$ is connected. 
Thus $Y\subset\mathbb{R}$ is a closed convex subset. As $Y\not\simeq \mathbb{R}$ there must exist an extreme point $y\in Y$.
Note that $C(X,Y)$ is a convex subset of $C(X,\mathbb{R})$ and the constant function $y$ is an extreme point of it. It follows that $C(X,Y)-\{y\}$ is also convex, hence contractible. But $C(X,Y)-\{y\}$ is homeomorphic to $\mathbb{R}$ minus a point. This is a contradiction.


