python remove scene

so I added an overlay scene with


logic.addScene("Loading", 1)

How do I remove that scene with python?

scene.end() (you can get all active scenes with bge.logic.getSceneList() iirc) . If getSceneList return a CListValue you can normally do bge.logic.getSceneList()[“loading”].end()
else bge.logic.getSceneList()[sceneindex].end()

Awesome, thanks!