You are on page 1of 1

print("abc123".

isalnum())#True-- if it contians only a to z or A to Z or 0 to 9


print("abc 123".isalnum())
print("abc@123".isalnum())
print("welcome".isalnum())
print("75874".isalnum())
print("----------------")
print("abc123".isalpha())#True-- if it contians only a to z or A to Z
print("welcome".isalpha())
print("hi to all".isalpha())
print("----------------")
print("abc123".isdecimal())#True-- if it contians only 0 to 9
print("123".isdecimal())
print("55.123".isdecimal())
print("-123".isdecimal())
print("----------------")
print("abc123".isdigit())#True-- if it contians only 0 to 9
print("123".isdigit())
print("55.123".isdigit())
print("-123".isdigit())
print("abc123".isidentifier())#True-- if it fallows rules of identifier the =n it
will True
print("abc 123".isidentifier())
print("45abc123".isidentifier())
print("____".isidentifier())
print("------------------")
print("aqeel 345".islower())
print("aqeel 345 Welcmoe".islower())
print("------------------")
print("aqeel 345".isnumeric())
print("345".isnumeric())
print("345.56".isnumeric())
print("-345".isnumeric())
print("------------------")
print("aqeel 345".isspace())
print(" ".isspace())
print("------------------")
print("aqeel 345".istitle())
print("The Hello To All".istitle())
print("------------------")
print("aqeel 345".isupper())
print("THE".isupper())

You might also like