Function Details: isascii

Description


Return True if all characters in the string are ASCII, False otherwise.


Extended Description


The isascii() method checks if all the characters in the string are ASCII characters. ASCII characters have points in the range 0-127. It returns True if all characters in the string are ASCII, including for an empty string.


Read More about isascii from Python Documentation

Function Signature



Module: builtins

Class: str

Parameters



Return


Returns a boolean indicating whether all characters in the string are ASCII.


Return Type


bool

Output

Explanation

This example demonstrates the basic usage of isascii(). It returns True because all characters are ASCII.