Python: add triple doc quotes and handle expansion of `"|"`

I've changed this to use `snip.c` now and added a comment.