Python String isascii() Method

❮ String Methods


Example

Check if all the characters in the text are ascii characters:

txt = "Company123"

x = txt.isascii()

print(x)
Try it Yourself »

Definition and Usage

The isascii() method returns True if all the characters are ascii characters  (a-z).

Check our ASCII Reference.


Syntax

string.isascii()

Parameter Values

No parameters.


❮ String Methods

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.