What is the optional statement used in a try except statement in Python?
Submitted by: AdministratorThere are two optional clauses used in try except statements:
1. Else clause: It is useful for code that must be executed when the try block does not create any exception
2. Finally clause: It is useful for code that must be executed irrespective of whether an exception is generated or not.
Submitted by: Administrator
1. Else clause: It is useful for code that must be executed when the try block does not create any exception
2. Finally clause: It is useful for code that must be executed irrespective of whether an exception is generated or not.
Submitted by: Administrator
Read Online Python Job Interview Questions And Answers
Top Python Questions
☺ | When do you use list vs. tuple vs. dictionary vs. set? |
☺ | What is python? |
☺ | What are uses of lambda? |
☺ | What is the optional statement used in a try except statement in Python? |
☺ | Do they know a tuple/list/dict when they see it? |
Top Coding/Programming Categories
☺ | Python Interview Questions. |
☺ | OOP Interview Questions. |
☺ | Software engineering Interview Questions. |
☺ | PHP Interview Questions. |
☺ | VBA (Visual Basic for Applications) Interview Questions. |