Is there an (isometric) isomorphism $L^2(\mathbb R)\cong L^2(\mathbb R \setminus \{0\})$? More generally, for a measure space $M$, do we have an isomorphism $L^2(M)\cong L^2(M \setminus N)$ for a subset $N\subset M$ of zero measure?
In the case of $L^2(\mathbb R)\cong L^2(\mathbb R \setminus \{0\})$ I thought about the following: $L^2(\mathbb R)\to L^2(\mathbb R \setminus \{0\})$ given by restriction, and $L^2(\mathbb R \setminus \{0\})\to L^2(\mathbb R)$ by $f\mapsto g$ with $g(x)=f(x)$ for $x\neq 0$ and $g(0)=a$ for an arbitrary fixed $a\in\mathbb R$. That should be an isomorphism because every function in $L^2(\mathbb R)$ is in fact an equivalence class and thus "coincides" with a function of value $a$ at $0$, because $\{0\}$ has zero measure. Is this correct or am I missing something?
Yes, and a natural surjective isometry is the map $[f]\mapsto \left[\left. f\right\rvert_{M\setminus N}\right]$ (provided you mean $N$ to have zero measure instead of the unwarranted Lebesgue measure). Same holds for all $L^p$ spaces.