Alright, it seems to have been the mute switch in the control center after all. Sound output from Pythonista now works.
I guess the mute switch was activated and was implicitly deactivated when I toggled the setting for the hardware switch between rotation lock and mute control in the settings for testing.
It also seems that all the music apps I'm using, including the iTunes music player, ignore the mute switch. Actually I have yet to find an app on the iPad that honors it (Twitter maybe?).