How to get back to scene view after opening python console?
In Blender 2.79, you close Areas by dragging them by their split widget towards the area you want to close.



By pressing Shift+F-Key (F1-F12), you switch the Area to a different Editor. You can also do this by clicking on the area's pop-up menu button and select a different area from there.