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

_tqt ? What is that?