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("All the characters in the string contains alphabets only in message1 (true/false):", message1.isalpha())
print("All the characters in the string contains alphabets only in message2 (true/false):", message2.isalpha())
print("All the characters in the string contains alphabets only in message3 (true/false):", message3.isalpha())
Click to Enlarge