$\int_{\gamma}\left(\frac{1}{z}-\frac{1}{z-1}\right)dz=0$ on $\mathbb C\setminus[0,1]$ $\int_{\gamma}\left(\frac{1}{z}-\frac{1}{z-1}\right)dz=0$ on $U:=\mathbb C\setminus[0,1]$ for a closed path with image in $U$


For any analytic function $f$ and a closed path $\gamma$:   $\int_{\gamma}f(w)dw=0$, and I know that $\frac1z$ and $\frac{1}{z-1}$ are analytic, so is their difference ?
Their difference is also anaytic, of course. Perhaps it's easier to see it as follows

$$\frac1z-\frac1{z-1}=-\frac1{z(z-1)}$$

and the above is anaytic on $\;\Bbb C\setminus\{0,1\}\;$, thus its integral is zero on any closed path not containing $\;0,1\;$ . What if it contains both points? Can you take it from here?
If $f$ is holomorphic in a simply connected domain $U,$ then $\int_\gamma f(z)\,dz = 0$ for every closed contour $\gamma$ in $U.$ In this problem, $U =\mathbb {C}\setminus [0,1]$ is simply connected, and $f(z) = 1/z-1/(z-1)$ is holomorphic in $U.$