Well, basically all I'd said was to
try an int() conversion and
except its error messages in case it encounters a number/literal not suitable for conversion to base 10. That is how you check for an input being a valid integer convertible.
This method is not "
command-line", only my test input was. Learn some more Python before jumping into the line of fire.