0 of 6 problems solved • 0%

Handling Exceptions

6 exercisesIntermediate

Place a conversion that can fail in a try block. A matching except block decides what to do next. ValueError is the exception int raises for text that is not an integer.

try: count = int("three") except ValueError: count = None