In the following Python solution 3, when using .isdigit() to determine that the input value is -5, why can it still be determined to be int? (According to the definition, negative numbers and floating point numbers should be false)

Thanks for your clues 。
From you input ,I finally realize the bug is that the false still trigger next step “return int”

    value.isdigit()==True
    return "int"

According to this ,I modify the solution 3 as below and i think it is workable now
Please feel free to commment if any valuable input ,thanks Chris!

def johnnysuper(value):
try:
if value.isdigit():
return “int”
elif int(value)<0:
return “int”
else:
pass
except ValueError:
pass
try:
float(value)
return “float”
except ValueError:
return “str”

value=input(“Please input :”)
print(johnnysuper(value))