Not x.islower() has different output than x.isupper() in list output...
Gregory Ewing
greg.ewing at canterbury.ac.nz
Sat Apr 30 01:47:40 EDT 2016
Christopher Reimer wrote:
> str.islower(): "Return true if all cased characters [4] in the string
> are lowercase and there is at least one cased character, false otherwise."
>
> str.isupper(): "Return true if all cased characters [4] in the string
> are uppercase and there is at least one cased character, false otherwise."
A string consisting of a single space doesn't contain any
cased characters, so both islower(" ") and isupper(" ")
return false according to these rules. The docs are correct.
--
Greg
More information about the Python-list
mailing list