quick question

Peter Hansen peter at engcorp.com
Tue Mar 8 11:07:24 EST 2005


Simon Brunning wrote:
> On Mon, 7 Mar 2005 18:58:20 -0500, Leeds, Mark <mleeds at mlp.com> wrote:
>>I want to get rid of the beginning 
>>And ending quotes. 
> 
>>>>my_string = '"8023     "'
>>>>my_string.strip('"')
> '8023     '

Note the risk in this approach, as it blindly
removes any number of leading and trailing quotation marks,
not just the first and last ones.

-Peter



More information about the Python-list mailing list