I have a list (or it can be 1-D numpy array) filled with zeros and ones:

![screenshot](https://i.imgur.com/HwmCXWd.png)

Is there an easy pythonic way to extract the index of items on a transition from one to zero and vice versa?  

For example for above screenshot it should be something like: [1350, 1600, 1970, ...]