I found this question in one of my past question papers of the college.
Let $X$ be any topological space. Does there exist a topological space $Y$ containing more than one point such that any function $f : X\to Y$ is continuous? Prove your claim or give an example of such a topological space.
I feel like this should not be true but I am not able to think of a counterexample. Any help would be appreciated
Let $Y$ be any set, and give it the topology in which the only two open subsets of $Y$ are $\emptyset$ and $Y$. For any $f: X \to Y$, we see that $f^{-1}(\emptyset) = \emptyset$ and $f^{-1}(Y) = X$. These are both open in $X$, so that $f$ is continuous. This worked for arbitrary functions $f: X \to Y$.