June 2017
Beginner
352 pages
8h 39m
English
A ValueError is raised when an object is of the right type, but contains an inappropriate value.
We've seen this already when trying to construct an int from a non-numeric string:
>>> int("jim")Traceback (most recent call last): File "<stdin>", line 1, in <module>ValueError: invalid literal for int() with base 10: 'jim'
Read now
Unlock full access