Python Exception Handling Tutorial! How to Set Up Error Handling with Try-Except Conditions

preview_player
Показать описание
When you build a python program that has conditions that may not always be met, and you don't want the entire program to crash if they are not met, you can set up exception handling, also sometimes referred to as error handling, to tell the code what to do in these scenarios.

The basic format of using try-except conditions (also known as try-except-else-finally) separates the sections of you code into 1) what code to try and see if it fails or not, 2) what to do when the code fails in an exception condition, 3) what to do if the code does pass using an else condition, and 4) what to do no matter what in a finally condition.

This is a very useful concept to grasp and a very beginner friendly tutorial! Hopefully you found it useful, don't forget to leave a like on the video, subscribe to the channel, and comment letting me know what you want to see more of in the future!

Consider checking out the LeMaster Tech Patreon page to help support the channel and support continued growth!
Рекомендации по теме
Комментарии
Автор

your packman video is so long i'm scared to do it😂😂😂😂

codinghighlightswithsadra
Автор

you should do one on regexes, great explanation :)

agentblack