Let $X$ be an uncountable set. Equip $X$ with the countable/cocountable sigma algebra. Equip $\mathbb{R}$ with the usual Borel sigma algebra. Suppose $f:X \to \mathbb{R}$ is constant everywhere except on a countable set. How do I show that $f$ is measurable?
I am thinking of saying something like $f$ agrees with a constant function everywhere except a set of measure $0$, so it is constant a.e, hence measurable. But the spaces are not equipped with a measure, so I don't think I can use this.