Multiple Exceptions
Catching different exception types
Interview Relevant: Robust error handling
Multiple Exceptions
Catching specific errors differently.
Code Examples
python
1try:
2 val = int("abc")
3except (ValueError, TypeError):
4 print("Invalid input")