single-quoted string conversion to triple-quoted string

robin and jim robinjim at earthlink.net
Fri Apr 5 19:05:58 EST 2002


Is there a way to convert a single quoted string to a triple quoted string?

For example, given:

''' abc %d xyz '''

the result of ''' abc %d xyz''' % 10 is:

' abc 10 xyz '

which is a single quoted string.

I would like to convert the result to a triple-quoted string.





More information about the Python-list mailing list