🔥 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

Free 51 Websites for Learning Education and Courses

🛑 లక్à°·à°²ు à°–à°°్à°šుà°ªెà°Ÿ్à°Ÿి à°•ాà°²ేà°œీà°²్à°²ో à°¨ేà°°్à°šుà°•ోà°²ేà°¨ి à°µిà°·à°¯ాలను, à°«్à°°ీà°—ా à°¨ేà°°్à°ªింà°šే 51 à°…à°¦్à°­ుతమైà°¨ à°µెà°¬్‌à°¸ైà°Ÿ్à°²ు ఇవే! 🛑 à°Žà°¡్à°¯ుà°•ేà°·à°¨్ and à°•ోà°°్à°¸ుà°²ు: Co...