lists, uppercase?

Alex Martelli aleax at aleax.it
Thu Jan 31 00:29:38 CET 2002


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.


Alex




More information about the Python-list mailing list