[Tutor] Operating in Place
Shashwat Anand
anand.shashwat at gmail.com
Tue Sep 28 22:12:20 CEST 2010
On Wed, Sep 29, 2010 at 1:33 AM, Corey Richardson <kb1pkl at aim.com> wrote:
> Hello tutors.
>
> I hate doing this:
> string = string.lower()
>
> Is there a way to do it without the "string =" part? Thanks.
>
1. string is a module which is deprecated. You should probably use str or s
in your example.
2. strings in python are immutable. If you need to change something, you
need to create a new string.
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
--
~l0nwlf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100929/09b314a3/attachment.html>
More information about the Tutor
mailing list