Articles → Python → isalnum function in python

isalnum function in python






Purpose





Example


message_one = "Hello123Hi"
message_two = "Hello@ Hi"

print("message_one contains only alphanumeric (true/false):", message_one.isalnum())
print("message_two contains only alphanumeric (true/false):", message_two.isalnum())

Output



Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, May 15, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250