Capture the Error Message with as
Use
except ValueError as e to grab the exception object, then store its message in a variable.Premium
Python
Setting up Python environment... Output