[Tutor] str.strip strange result...?

Jignesh Sutar jsutar at gmail.com
Fri Jan 15 12:50:19 EST 2016


Gotcha and thank you for the reminder to read the documentation. Very
clear, indeed.

Many thanks!
Cheers
Jignesh
On Fri, 15 Jan 2016 at 17:32, Mark Lawrence <breamoreboy at yahoo.co.uk> wrote:

> On 15/01/2016 16:25, Jignesh Sutar wrote:
> > #python2.7
> >
> >>>> s="V01_1"
> >>>> s.strip("_1")
> > 'V0'
> >
> > Wouldn't you expect the result to be "V01" ?
> >
> > Cheers
> > Jignesh
>
> No, never expect anything from a given programming language.  What did
> you not understand about this
> https://docs.python.org/3/library/stdtypes.html#str.strip when you read
> it?
>
> --
> My fellow Pythonistas, ask not what our language can do for you, ask
> what you can do for our language.
>
> Mark Lawrence
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>


More information about the Tutor mailing list