single-quoted string conversion to triple-quoted string

Emile van Sebille emile at fenx.com
Fri Apr 5 20:45:32 EST 2002


"robin and jim" <robinjim at earthlink.net>
> 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.
>
>

What do you want to do with it?  Once a string is created, it doesn't
matter which style quoting was used -- it's simply a string.



--

Emile van Sebille
emile at fenx.com

---------




More information about the Python-list mailing list