In "An Introduction to Algebraic Topology" of Rotman, Exercise 1.31 asks to show that the equator $\mathbb{S}^{n-1}$ is a deformation retract of $\mathbb{S}^n\setminus\{a, b\}$.
I thought that if one thinks to the usual sphere in the space, then one just enlarge the holes to flatten $\mathbb{S}^3$ onto its equator, but I cannot understand how to prove this in general for $n$, probably it's the same idea but I cannot construct the required function.
As per the comments, $S^n\setminus\{a\}$ is homeomorphic to $\mathbb{R}^n$.
Now it suffices to see that $\mathbb{R}^n\setminus\{0\}$ (strongly) deformation retracts onto $S^{n-1}$ (if you know that you just have to move things around a bit to get $b$ to align with $0$ and $S^{n-1}$ to align with the image of the equator)
For this, consider $r:x\mapsto \frac{x}{||x||}$, which is indeed a retraction. Moreover, define $H(x,t)= r(x)t+(1-t)x$. Clearly it is continuous, and it is easy to check that it does land in $\mathbb{R}^n\setminus\{0\}$ (and not just $\mathbb{R}^n$), and it is clearly a homotopy between $id$ and $r$ (I should really write $i\circ r$, where $i$ is the inclusion);
and moreover (although it is not necessary to get a deformation retract, that we already got) you can check that $H$ is constant equal to the identity on $S^{n-1}$