[Tutor] how to tell if strings have numbers in them

Tim Peters tim.one@home.com
Fri, 5 Jan 2001 01:50:45 -0500


[Deirdre Saoirse]
> Actually, it's [string.isdigit()] also in 1.6. I don't remember
> quite when it was introduced.

These things (.isdigit(), .isspace(), istitle(), etc) came along with
Unicode support, and indeed for the first time in 1.6.  Answering "is this
is a digit?" is a lot harder in Unicode!  So Python does it for you.  The
same methods were added to regular (8-bit) strings at the same time, for
uniformity.

although-they-may-get-used-more-on-8-bit-strings-in-the-end-ly y'rs
    - tim