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

Steven D'Aprano steve at pearwood.info
Fri Apr 29 21:51:13 EDT 2016


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 for Unicode. In Python 2, strings (ASCII byte
strings) also have an istitle() method:

py> "Dz".istitle()
True
py> "DZ".istitle()
False



-- 
Steven




More information about the Python-list mailing list