lists, uppercase?

John W. Baxter jwbaxter at spamcop.net
Thu Jan 31 22:24:26 EST 2002


In article <mailman.1012431053.27737.python-list at python.org>, Brian
Quinlan <brian at sweetapp.com> wrote:

> > how can i get to know if a string is totally uppercase?
> 
> >>> 'ABC'.isupper()
> 1
> >>> 'abc'.isupper()
> 0
> >>> '123'.isupper()
> 0

And
>>> '12C'.isupper()
1

which may be "right" or not, depending upon need.

  --John



More information about the Python-list mailing list