Handling exceptions with try/except and try/finally 

try/except is here to save the day if some code fails. We've seen errors before. In Jupyter, they appear as text highlighted in red when we do something wrong. In many cases, however, it is hard to predict whether an error will occur—for example, if we're working with an external database or service, there is no guarantee that everything will work as it should all the time. Before we learn how to mitigate those potential exceptions, let's briefly review what the exception is and why we should create our own ones.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.176.225