Exercise: Compute the residue of $ 1/(\sin z) $ at $z=\pi$
Sketch:
I tried to compute the residue at $z = 0$, because for $z = \pi$ it is the same.
Taylor power series expansion around zero:
$$\sin z=z-\frac{z^3}{6}+\ldots\implies\frac{1}{\sin z}=\frac{1}{z\left(1-\frac{z^2}{6}+\ldots\right)}=\frac{1}{z}\left(1+\frac{z^2}{6}+\frac{z^4}{120}+\ldots\right)$$
It's correct solution?
The point $a$ is a simple pole of the function $f$ if and only if $$ \lim_{z\to a}(z-a)f(z)=l $$ is finite and nonzero. In this case $l$ is the residue.
Thus you need to compute $$ \lim_{z\to\pi}\frac{z-\pi}{\sin z}=\lim_{w\to0}\frac{w}{\sin(w+\pi)}=\lim_{w\to0}-\frac{w}{\sin w}=-1 $$