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