{"id":24466,"date":"2021-10-17T18:42:27","date_gmt":"2021-10-17T13:12:27","guid":{"rendered":"https:\/\/python-programs.com\/?p=24466"},"modified":"2021-11-05T19:24:18","modified_gmt":"2021-11-05T13:54:18","slug":"program-for-python-string-isalpha-method","status":"publish","type":"post","link":"https:\/\/python-programs.com\/program-for-python-string-isalpha-method\/","title":{"rendered":"Program for Python String isalpha() Method"},"content":{"rendered":"

In the previous article, we have discussed Python Program for isalnum() Function<\/a>
\nisalpha() Function in Python:<\/strong><\/p>\n

If all of the characters are alphabet letters, the isalpha() method returns True (a-z).<\/p>\n

(space)!#%&? etc are examples of characters that are not alphabets.<\/p>\n

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

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

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

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

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

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

Given first string = \"pythonprograms\"\r\nGiven second string = \"123456good morning\"<\/pre>\n

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

The above given first string is : pythonprograms\r\nThe given first string after applying isalpha() function: True\r\nThe above given second string is : 123456good morning\r\nThe given second string after applying isalpha() function: False<\/pre>\n

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

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

Given first string = \"hello123this is python programming platform\"\r\nGiven second string = \"hellogoodmorning\"<\/pre>\n

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

The above given first string is : hello123this is python programming platform\r\nThe given first string after applying isalpha() function: False\r\nThe above given second string is : hellogoodmorning\r\nThe given second string after applying isalpha() function: True<\/pre>\n

Program for isalpha() Function in Python<\/h2>\n