TITLE: Every function from discrete metric space to another metric space is uniformly continuous
QUESTION [7 upvotes]: My solution:It is fairly straightforward graphically but I just want to ensure if it is rigorous enough.
Suppose $X$ is a discrete metric space and $f$ be any function from $X$ to $Y$ where $Y$ is any other metric space. Let $d_{x}$ and $d_{y}$ denote the metrics in metric spaces $X$ and $Y$ respectively. 
If $p,q\in X, p=q$, then $d_{x}(p,q)=0<\delta$ for any $\delta>0$.
If $p,q\in X, p\neq q$, then $d_{x}(p,q)=1$.
Choosing $\delta=2$, we have $d_{y}(f(p),f(q))<\epsilon$, $\forall \epsilon>0$.
So $\forall \epsilon>0,$ we have $\delta>2$, such that $d_{x}(p,q)<\delta$ implies $d_{y}(f(p),f(q))<\epsilon$.
So, any function from a discrete metric space to any other metric space is uniformly continuous.
Please suggest if it is correct and rigorous enough.

REPLY [2 votes]: To show that $f$ is continuous:
Discrete metric induces discrete topology, then preimage of any open set in $Y$ is automatically open in $X$ thus $f$ is continuous. 
(For uniform continuity use the fact that singletons are open as Paul and Suzu. Hirose pointed out earlier.)