On 26 Jan 2007 21:33:47 -0800, [EMAIL PROTECTED] wrote:
hi
can someone explain strip() for these :
[code]
x='www.example.com'
x.strip('cmowz.')
'example'
[/code]
when i did this:
[code]
x = 'abcd,words.words'
x.strip(',.')
'abcd,words.words'
[/code]
it does not strip off , and . .Why is
[EMAIL PROTECTED] a écrit :
hi
can someone explain strip() for these :
[code]
x='www.example.com'
x.strip('cmowz.')
'example'
[/code]
when i did this:
[code]
x = 'abcd,words.words'
x.strip(',.')
'abcd,words.words'
[/code]
it does not strip off , and . .Why is this so?
hi
can someone explain strip() for these :
[code]
x='www.example.com'
x.strip('cmowz.')
'example'
[/code]
when i did this:
[code]
x = 'abcd,words.words'
x.strip(',.')
'abcd,words.words'
[/code]
it does not strip off , and . .Why is this so?
thanks
--
[EMAIL PROTECTED] wrote:
hi
can someone explain strip() for these :
[code]
x='www.example.com'
x.strip('cmowz.')
'example'
[/code]
when i did this:
[code]
x = 'abcd,words.words'
x.strip(',.')
'abcd,words.words'
[/code]
it does not strip off , and . .Why is this so?
thanks
On Fri, 26 Jan 2007 21:33:47 -0800, eight02645999 wrote:
hi
can someone explain strip() for these :
[code]
x='www.example.com'
x.strip('cmowz.')
'example'
[/code]
when i did this:
[code]
x = 'abcd,words.words'
x.strip(',.')
'abcd,words.words'
[/code]
it does not strip off , and
Steven D'Aprano wrote:
On Fri, 26 Jan 2007 21:33:47 -0800, eight02645999 wrote:
hi
can someone explain strip() for these :
[code]
x='www.example.com'
x.strip('cmowz.')
'example'
[/code]
when i did this:
[code]
x = 'abcd,words.words'
x.strip(',.')
'abcd,words.words'
[/code]
it does not
On Jan 27, 4:33 pm, [EMAIL PROTECTED] wrote:
hi
can someone explain strip() for these :
[code] x='www.example.com'
x.strip('cmowz.')'example'
[/code]
According to the documentation (with emphasis added):
Return a copy of the string with the *leading* and *trailing*
characters removed.