Suppose X is a normal topological space. Suppose some metric space for example.
If {$A\_n$}$\_{n=1}^{\infty}$ is a collection of pairwise disjoint closed subsets of X, can we find a continuous function on X such that it takes the constant value $n$ on $A\_n$..?



Can we generalize the result of Urysohn's lemma to countable collection of pairwise disjoint closed subsets of a normal space..?
As evidenced in the comments and David´s answer, the problem is that even if each $A\_n$ is closed, there can be too much "interaction" between the $A\_n$'s. A more extreme example would be to take $A\_n=\{ q\_n \}$ where $\{q\_n\}\_{n=1}^\infty$ is some enumeration of the rational numbers.


However if $\{A\_n \}\_{n=1}^\infty$ is a discrete family of closed subsets of the normal space $X$ and $\{c\_n \}\_{n=1}^\infty$ is any sequence of real numbers, then there is a continuous $f:X \to \mathbb{R}$ such that $f$ takes the constant value $c\_n$ in each $A\_n$. For this just note that the union of the $A\_n$´s is closed in $X$ and each $A\_n$ is clopen in this union.


**Note:** a family $\{A\_n \}\_{n=1}^\infty$ of subsets of the space $X$ is a *discrete family* if any $x \in X$ has a neighborhood that intersects at most one of the $A\_n$'s.


