“had gone out.” The Greek is exerchomai (#1831 ἐξέρχομαι). The meanings include, to move out of or away from an area, and thus of an animate entity to go out, come out, go away, retire. Demons can inhabit the mind or body, and thus when they leave they are “gone out.”