{"id":25556,"date":"2021-11-23T08:56:46","date_gmt":"2021-11-23T03:26:46","guid":{"rendered":"https:\/\/python-programs.com\/?p=25556"},"modified":"2021-11-23T08:56:46","modified_gmt":"2021-11-23T03:26:46","slug":"python-string-isascii-method-with-examples","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-string-isascii-method-with-examples\/","title":{"rendered":"Python String isascii() Method with Examples"},"content":{"rendered":"

String isascii() Method in Python:<\/strong><\/p>\n

If all of the characters are ASCII, the isascii() method returns True (a-z). Otherwise returns False.<\/p>\n

Syntax:\u00a0<\/strong><\/p>\n

string.isascii()<\/pre>\n

Parameters: <\/strong>This method has no parameters.<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given string = \"hello@%btechgeeks670\"<\/pre>\n

Output:<\/strong><\/p>\n

True<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given string = '\u00df'<\/pre>\n

Output:<\/strong><\/p>\n

False<\/pre>\n

String isascii() Method with Examples in Python<\/h2>\n