$ ./guess_the_languageProblem Solving — fix the bug
Problem Solving — fix the bug · medium · #214

Which fix removes the bug?

try:
    run()
except ValueError, TypeError:
    log('bad input')
  1. Write ValueError or TypeError
  2. Catch (ValueError, TypeError)
  3. Write ValueError | TypeError
  4. Use two try blocks instead
Several exception types must be grouped in a tuple; the comma form is a Python 2 syntax error.
Play Problem Solving ▸