Why is this ValueError exception used here and not TypeError exception?

前端 未结 0 1606
伪装坚强ぢ
伪装坚强ぢ 2021-02-10 12:39

I\'m trying to understand why ValueError is used here and not TypeError.

If userInput is "a", the code below will print "That\'s not an int!":

相关标签:
回答
  • 消灭零回复
提交回复
热议问题