I want to handle ValueError in Python. But whenever I type the below code I get an error and I want the output as I excepted.
a, b = map(int, input().split())
try:
print(a//b)
except ZeroDivisionError as e:
print('Enter code: ', e)
except ValueError as e:
print('Enter code: ', e)
If my inputs for a and b are '1' and '$' than Expected output for ValueError: 'Enter code: invalid literal for int() with base 10: $