Articles → Python → Isalpha Function In Python
Isalpha Function In Python
Purpose
Example
message1 = "this is string example1"
message2 = "this is string example"
message3 = "thisisstringexample"
print("Contains alphabets only in message1 :", message1.isalpha())
print("Contains alphabets only in message2 :", message2.isalpha())
print("Contains alphabets only in message3 :", message3.isalpha())
Output