Which fix removes the bug?
try:
run()
except ValueError, TypeError:
log('bad input')
- Write
ValueError or TypeError - Catch
(ValueError, TypeError) - Write
ValueError | TypeError - Use two
tryblocks instead
Several exception types must be grouped in a tuple; the comma form is a Python 2 syntax error.
Play Problem Solving ▸