lists, uppercase?
Magnus Lie Hetland
mlh at vier.idi.ntnu.no
Thu Jan 31 16:37:09 EST 2002
In article <Cl%58.9947$om6.257295 at news1.tin.it>, Alex Martelli wrote:
>Brian Quinlan wrote:
> ...
>>> how can i get to know if a string is totally uppercase?
>>
>>>>> 'ABC'.isupper()
>> 1
>>>>> 'abc'.isupper()
>> 0
>>>>> '123'.isupper()
>> 0
>
>Just be aware of one anomaly: ''.isupper() is 0.
>
And ''.islower() is 0. I guess you have to have some letters in there
for any of these to be true. Hm.
>
>Alex
>
--
Magnus Lie Hetland The Anygui Project
http://hetland.org http://anygui.org
More information about the Python-list
mailing list