I'm trying to prove $L^p(\mathbb{R})$, $p \in [1,\infty)$ is separable by showing the collection$$ S:= \{\sum_{i=1}^nr\chi_{(a_i,b_i)}\}_{(a_i,b_i,r) \in \mathbb{Q}^3}$$ is dense in $L^p$. So, since simple functions are dense in $L^p$ given $f \in L^p$, Let $\epsilon >0$ and choose $s$ such that $\|s-f\|_{L^p} < \frac{\epsilon}{2}$. Now, let $$s = \sum_{i=1}^{n} c_i \chi_{E_i}$$ with $E_i$ pairwise disjoint, wlog. Let $r \in S$ with $$r = \sum_{i=1}^{n} r_i \chi_{A_i}$$ be such that $|r_i - c_i| <1$ and $\mu((E_i\setminus A_i) \cup (A_i\setminus E_i)) < \frac{\epsilon^p}{2n}$ with the $A_i$ pairwise disjoint, wlog. Then,
\begin{eqnarray*} \left( \int_\mathbb{R} |s-r|^p \, d\mu \right)^\frac{1}{p} &\leq& \left( \int_\mathbb{R} \left(\sum_{i=1}^{n}|c_i\chi_{E_i}-r\chi_{A_i}| \right)^p \, d\mu \right)^\frac{1}{p} \\ & \stackrel{Minkowski}{\leq}& \sum_{i=1}^{n} \left( \int_\mathbb{R} |c_i\chi_{E_i}-r_i\chi_{A_i}|^p \, d\mu \right)^\frac{1}{p} \\ &<& \sum_{i=1}^{n} \left( \int_\mathbb{R} |\chi_{(E_i\setminus A_i) \cup (A_i\setminus E_i)}|^p \, d\mu \right)^\frac{1}{p} \\ &=& \sum_{i=1}^{n} \left( \int_{(E_i\setminus A_i) \cup (A_i\setminus E_i)} 1 \, d\mu \right)^\frac{1}{p} \\ &<& \sum_{i=1}^{n} (\frac{\epsilon^p}{n})^\frac{1}{p} = \frac{\epsilon}{2} \end{eqnarray*}
since $$|c_i\chi_{E_i} - r_i\chi_{A_i}| = \begin{cases}
0 \quad \,: x \notin A_i \cup E_i, x \in A_i \cap E_i\\
|c_i-r_i| \quad \, : x \in (E_i \setminus A_i) \cup (A_i \setminus E_i). \\
\end{cases} < \chi_{(E_i\setminus A_i) \cup (A_i\setminus E_i)}
$$
and therefore $\|f-r\|_{L^p} < \epsilon$, as desired.
Is this correct? Do I need fix anything? Are the assumptions I've made about disjointness okay?
$E_i$ could be any measurable set, for instance, $E_i=(1,2)\cup (3,4$). It is not clear from your proof how to approximate an arbitrary $E_i$ with a single open interval.