lists, uppercase?
Steve Holden
sholden at holdenweb.com
Wed Jan 30 17:32:58 EST 2002
"Bjorn Pettersen" <BPettersen at NAREX.com> wrote in message
news:mailman.1012427749.9821.python-list at python.org...
> From: maximilianscherr [mailto:MaximilianScherr at T-Online.de]
>
> just two questions this time:
>
[list reversal]
> how can i get to know if a string is totally uppercase?
if myString == myString.upper():
# it's all upper case
Well, not strictly true: what that tells you is that there are no lower-case
letters in the string. But
"123" == "123".upper()
even though there's not an upper case character to be seen. Depends exactly
what the requirement is, I suspect.
regards
Steve
--
Consulting, training, speaking: http://www.holdenweb.com/
Python Web Programming: http://pydish.holdenweb.com/pwp/
More information about the Python-list
mailing list