Handle triple-quoting in python