I'm trying to validate an input in Python that needs to be both ten digits long and a non-negative number. I thought I'd use a couple try-catch statements to do so, but even when the output fits an exception, the exception ain't being triggered
i = input("Please input a value: ")
try:
(len(str(i)) == 10) == True
except:
print("False")
try:
(float(i) > 0) == True
except:
print("False")
I'm expecting it to simply return "False" when I insert something like "123" or "-1029347365", but there's no output