On 21Apr2015 09:03, alan.ga...@btinternet.com wrote:
On 21/04/15 05:19, Jim Mooney wrote:
Is there any difference between these two since they give the same result,
and when is the second preferred?
x = 'ABE'
x.lower()
'abe'
str.lower(x)
'abe'
They are essentially the same method being a
Jim Mooney wrote:
> Is there any difference between these two since they give the same result,
> and when is the second preferred?
>
x = 'ABE'
x.lower()
> 'abe'
str.lower(x)
> 'abe'
You may call str.lower() explicitly for subclasses of str. If the subclass
overrides the lower() me
On 21/04/15 05:19, Jim Mooney wrote:
Is there any difference between these two since they give the same result,
and when is the second preferred?
x = 'ABE'
x.lower()
'abe'
str.lower(x)
'abe'
They are essentially the same method being accessed in two
different ways. The first via the insta
Is there any difference between these two since they give the same result,
and when is the second preferred?
>>> x = 'ABE'
>>> x.lower()
'abe'
>>> str.lower(x)
'abe'
--
Jim
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription o