Understanding exceptions in Python and how to handle them gracefully.