Let $(K,\mathcal{B},P)$ be a probability space where $K$ is a compact set, $\mathcal{B}$ is the Borel sigma-algebra and P is a Borel probability measure. Let $A$ be an arbitrary finite set.
Consider the space of measurable functions from $K$ to $A$, endowed with the following metric: for every $f,g \in A^K$ $d(f,g)=P(\{k \in K:f(k)\neq g(k)\})$. Is this set compact? If yes, why? If not, can you provide a counterexample?