On Wed, 29 Sep 2010 06:12:20 am Shashwat Anand wrote:
> On Wed, Sep 29, 2010 at 1:33 AM, Corey Richardson
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 whic
On Wed, 29 Sep 2010 06:03:21 am Corey Richardson wrote:
> Hello tutors.
>
> I hate doing this:
> string = string.lower()
>
> Is there a way to do it without the "string =" part? Thanks.
No, strings are immutable. Once they're created, they cannot be changed.
This is no different fr
On Tue, Sep 28, 2010 at 3:03 PM, Corey Richardson wrote:
> Hello tutors.
>
> I hate doing this:
> string = string.lower()
>
> Is there a way to do it without the "string =" part? Thanks.
>
I suppose the best answer is it depends on what you are doing with
string after you do string.lo
On 28-Sep-10 13:03, Corey Richardson wrote:
I hate doing this:
string = string.lower()
Is there a way to do it without the "string =" part? Thanks.
Depends on the class. In this specific case, string objects are
immutable (for some good reasons which are beyond the immediate point),
so once
On Tue, Sep 28, 2010 at 3:03 PM, Corey Richardson wrote:
> Hello tutors.
>
> I hate doing this:
>string = string.lower()
>
> Is there a way to do it without the "string =" part? Thanks.
>
Not with a string. I suppose if you had your own class you could create
something, but you'd be
On Wed, Sep 29, 2010 at 1:33 AM, Corey Richardson 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.
Hello tutors.
I hate doing this:
string = string.lower()
Is there a way to do it without the "string =" part? Thanks.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/li