15 YouTube views, likes subscribers in 10 minutes. Free!
Get Free YouTube Subscribers, Views and Likes

Exception Handling in Python | TRY EXCEPT in Python | Python Tutorial for Beginners #8

Follow
techTFQ

Exception Handling in Python can be done using try except in python. Handling exceptions is one of the most important aspects of a good python program hence in python we can handle exceptions by placing the block of code which we assume to be causing error inside a try and except block.
Any error caused by the block of code within the try except clause won’t be returned to the user but will be handled by the except block.

In Python, we can also raise user defined exceptions using the raise Exception clause. Raise exception can be used anywhere in the code to cause an error based on certain conditions.
We can raise and exception within the try except block so the user defined error can be caught by the try except block.

Within try except exception handling in python, we can also use ELSE and FINALLY clause. Block of code within else will be executed when the code within try does not throw an error. If the block of code within try causes an exception, then the except block will be called and the block of code within except will be executed.
Block of code within finally, will be executed every time. Meaning whether there is an exception or not, if you have mentioned finally in your try exception block then the block of code within finally will always be executed.

This video is aimed at complete beginners who are just getting started with programming or with python programming. The concepts are explaining in the most basic manner so anyone can understand it.

The purpose of this Python tutorial series for beginners is to explain python programming in the most simplest manner by providing simple examples and working out interesting and meaningful python programs which should be a better way to learn programming especially for the beginners.

All the programs and content of this video will be posted in my website https://techtfq.com/

So please make sure to check that out as well.

Other video’s in this tutorial series:

Local and Global Scope in Python | Local and Global Variables | Python Tutorial for Beginners #7
   • Local and Global Scope in Python | Lo...  

What is a FUNCTION in Python | Python Functions | Python Tutorial for Beginners #6
   • What is a FUNCTION in Python | Python...  

Import modules in Python | Import module from different directory | Python Tutorial for Beginners #5
   • Import modules in Python | Import mod...  

WHILE loop and FOR loop in Python | LOOP statements in Python | Python Tutorial for Beginners #4
   • WHILE loop and FOR loop in Python | L...  

IF ELSE ELIF statement in Python | IF ELSE Statement in Python | Python Tutorial for Beginners #3
   • IF ELSE ELIF statement in Python | IF...  

What is a VARIABLE in Python | Python Variables | Python Tutorial for Beginners #2
   • What is a VARIABLE in Python | Python...  

What are DATA TYPE, OPERATORS and EXPRESSION in Python | Python Tutorial for Absolute Beginners #1
   • What is DATA TYPE, OPERATORS and EXPR...  


Please like, subscribe and leave a comment if you found the video to be useful. Also please make sure to click on the notification bell to be notified of my latest video’s.

WATCH MORE VIDEOS HERE

✅ SQL Tutorial Basic concepts:
   • SQL Tutorial  Basic concepts  

✅ SQL Tutorial Intermediate concepts:
   • SQL Tutorial  Intermediate concepts  

✅ SQL Tutorial Advance concepts:
   • SQL Tutorial  Advance concepts  

✅ Practice Solving Basic SQL Queries:
   • Practice Solving BASIC SQL Queries  

✅ Practice Solving Intermediate SQL Queries:
   • Practice Solving INTERMEDIATE SQL Que...  

✅ Practice Solving Complex SQL Queries:
   • Practice Solving COMPLEX SQL Queries  

✅ Data Analytics Career guidance:
   • Data Analytics career and more  

✅ SQL Course, SQL Training Platform Recommendations:
   • SQL Course / Training  

✅ Python Tutorial:
   • Python Tutorial  

✅ Git and GitHub Tutorial:
   • Git and GitHub  

✅ Data Analytics Projects:
   • Data Analytics Projects  

THANK YOU,
Thoufiq

posted by Garliny9