Check a String is Alphabet in Python

  • Post category:String

In this article, you will see how to check a string is alphabet in Python. An alphabet string is a string that contains only letters. The string isalpha() method returns True if all characters in the string are alphabets, otherwise False.

Step 1: Create a string

Python

Step 2: Check if a string is an alphabet

Python

Output:

str =  CodeAllow
str type =  <class 'str'>
Alphabet

Free resources to learn advanced skills: AiHints and CodeAllow