is_ascii(s) that returns True if every character in s has an ASCII code point (0-127), and False if any character (like an accented letter or emoji) falls outside that range.s = 'Hello123'
True
All characters are basic ASCII letters and digits.
s = 'héllo'
False
'é' has code point 233, above the ASCII range.
`ord(c) < 128` for every character `c` tells you it is ASCII.
Python 3.7+ also exposes `str.isascii()` directly.