Ques - Check whether a character is an alphabet, digit or special character
I have written a python code solution and it is working well. But when I input ("@"), I get the output as an alphabet instead of special character. Can someone tell me why and how to solve it for @.
inp = input("Enter anything : ")
if inp >= "a" and inp <= "z" or inp >= "A" and inp <= "Z":
print("input is alphabet")
elif inp>="0":
print("input is number")
else:
print("special character")
Just add a special catagory for
special char