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())




Picture showing the output of the isAlpha function in python

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Friday, February 22, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250