# If $X \subset \mathbb R$ is measurable then for every $\alpha \in (0, \mu(X))$ there exists $X_\alpha \subset X$ such that $\mu(X_\alpha) = \alpha$

Let $X \subset \mathbb R$ be a Lebesgue measurable set, with $\mu(X)>0$. Then for every $\alpha \in (0, \mu(X))$ there exists a measurable subset $X_\alpha \subset X$ such that $\mu(X_\alpha) = \alpha$.

Could you please provide any hints, please? I've thought about inner/outer regularity of Lebesgue measure but I can't manage to finish. For example, we know that for every $\varepsilon>0$ there exists a close subset $C \subset X$ s.t. $\mu(X \setminus C)<\varepsilon$... but how can I use this?

Consider the function $f : X \to [0, \infty]$, $f(x) = \mu(X \cap [-x, x])$. Show that this function is continuous and use the intermediate value theorem.