checking for ASCII character

Andrew Dalke adalke at mindspring.com
Thu Nov 13 16:16:32 EST 2003


Greg Krohn:
> If it needs to be ASCII, the simplest way is probably:
>
> if ord(character) in range(65, 91):
>      <some code>

or

  if character in string.ascii_uppercase:
      ...

                    Andrew
                    dalke at dalkescientific.com






More information about the Python-list mailing list