Fix Python output formatting

Fixes #28