Re: Not x.islower() Versus x.isupper Output Results

2016-04-29 Thread Steven D'Aprano
On Sat, 30 Apr 2016 11:31 am, Steven D'Aprano wrote: > In unicode, there are also: > > - titlecase characters, like "DžLjῼ" To be clear, each of those three characters is considered titlecased individually. The three of them together is not considered a title-cased string. "Is Title" is not just

Re: Not x.islower() Versus x.isupper Output Results

2016-04-29 Thread Steven D'Aprano
On Sat, 30 Apr 2016 11:14 am, Christopher Reimer wrote: > Shouldn't the results between 'not x.islower()' and 'x.isupper()' be > identical? Of course not. py> "2 #".islower(), "2 #".isupper() (False, False) py> not "2 #".islower(), "2 #".isupper() (True, False) "Is Lower" versus "Is Upper" is

Not x.islower() Versus x.isupper Output Results

2016-04-29 Thread Christopher Reimer via Python-list
Greetings, I was playing around with a piece of code to remove lowercase letters and leave behind uppercase letters from a string when I got unexpected results. string = 'Whiskey Tango Foxtrot' list(filter((lambda x: not x.islower()), string)) ['W', ' ', 'T', ' ', 'F'] Note the