The function defined by $f:X{\rightarrow}Y$ is continuous. If $X$ is endowed with discrete metric.
Then, ball $B(x,\dfrac{1}{2})=\{x\}$ for all $x\in X $.
For any $\epsilon >0$,
$f(B(x,\dfrac{1}{2}) \subset B(f(x), \epsilon) $
Now,consider characteristic function
$\chi_{A}:X{\rightarrow}R$ defined by
$\mathcal{X}_E(x) =\begin{cases}1, if& x \in E\\ 0, & if& x \not\in E \\ \end{cases}$
is discontinuous if $X=R$ endowed with the standard metric.
But, is continuous if $X$ is $R$ endowed with the discrete metric.
And Now,
let (X, M) is a measurable space ,
where sigma algebra $M =\{\phi, X, \{a\}, \{b\}\}$ and $X=\{a, b\}$.
Then , the characteristic function is measurable.
Let $E\subset R$,
$\mathcal{X}_A^{-1}(E) =\begin{cases}X, & 0,1 \in E \\A, & 1 \in E, 0 \notin E \\A^C, & 1 \notin E, 0 \in E \\\emptyset, & o.w.\end{cases}$
This gives our characteristic function is measurable and continuous. And according to definition of simple function a complex measurable function s on a measurable space $X$ whose range is only finitely many points is called simple function. Hence,the characteristic function consider above is continuous simple function.
Thus,giving us a continuous simple function. I am correct or wrong please check and correct my understanding .I have used Rudin book of Real and complex analysis and some online notes .
If a topological space $X$ is discrete then any its subset is open (and so Borel) so any function from $X$ to a topological space is continuous, and any function from $X$ to a measurable space is Borel-measurable.