🔥 Welcome to my blog! Latest updates available now. Visit daily! 🔥 🔥 Click Here for Latest Updates – Visit My Blog 🔥
🔥 Latest Updates 📊 GP Grade Finder 📢 Government Services Info 🆕 New Schemes Updates

Default Exception Handling in Python



👉Every exception in Python is an object. 

👉For every exception type, the 

     corresponding classes are available.

👉Whenever an exception occurs, PVM will create the corresponding exception object and will check for handling code. 

👉If handling code is not available, then the Python interpreter terminates the program abnormally and prints corresponding exception information to the console.

👉The rest of the program won’t be executed.

Ex:Python1.py

1) print("Hello")

2) print(10/0)

3) print("Hi")

Output:


D:\Python3>py Python1.py

Hello

Traceback (most recent call last):

  File "test.py", line 2, in <module>

    print(10/0)

ZeroDivisionError: division by zero

No comments:

Post a Comment

Thank you Very Much.For Given Comment

Birth & Death Registration Rules 2026

జనన, మరణాà°² నమోà°¦ు à°µిà°·à°¯ంà°²ో 2026 à°…à°•్à°Ÿోబర్ 1 à°¨ుంà°šి à°•ొà°¤్à°¤ à°¨ిà°¬ంధనలు అమల్à°²ోà°•ి à°°ాà°¨ుà°¨్à°¨ాà°¯ి. 🔹 21 à°°ోà°œుà°²్à°²ోà°ªు: à°¸ాà°§ాà°°à°£ à°°ిà°œిà°¸్à°Ÿ్à°°ేà°·à°¨్ 🔹 21 à°°ోà°œుà°² తర్à°µాà°¤...