String Methods
isascii()
Check whether every character is an ASCII character.
str.isascii()
Check whether every character is an ASCII character.
Result
Returns
True if every character is ASCII, including the empty string; otherwise False.
Run it
Try it
Run it and change it
text = "café" print(text.isascii())
Output
Press Run to see what it prints.