PyDocs

Nav

Python Runtime Services

str.isascii

builtins

method of str · Added in 3.7
  • str.isascii()
Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F.
Empty string is ASCII too.
1 Example
>>> 'ASCII characters'.isascii()
True
>>> 'µ'.isascii()
False
from the Python docs
See Also
No see-alsos for builtins/str.isascii
0 Notes
No notes for str.isascii