The better way to handle this in idiomatic python is to use `enumerate`.

`for i, action in enumerate(self.actions):`