how to check whether input is string or not

29

num = input("Enter your number ")

print("\n")
if num.isdigit():
    print("User input is Number ")
else:
    print("User input is string ")

Comments

Submit
0 Comments