Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You could do that in Python using the ord function.

    white_ranges = [('0', '9'), ('A', 'Z'), ('a', 'z')]
    any([ord(low) <= ord(x) <= ord(high) for low, high in white_ranges])




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: