[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I'm wrong or Will we fix the ducks limp?

On Sat, 4 Jun 2016 12:50 pm, Christopher Reimer wrote:

>> Nor can you uppercase a string until the string exists:
>> s = "hello world"
>> s = s.uppercase()
>  >>> s = "hello world".upper()
>  >>> print(s)

"hello world" creates a string. Then you call .upper() on that string.

Perhaps a better example (demonstrating the impossibility) would be:

s = .upper()

but I thought that would not be clear.

> This works in Python 3. Not sure if s.uppercase() was meant as an
> example for a different language.

Nope, just not the clearest example.