Home / CSE MCQs / Python MCQs :: Discussion

Discussion :: Python MCQs

  1. When will the else part of try-except-else be executed?
  2. A.
    always
    B.
    when an exception occurs
    C.
    when no exception occurs
    D.
    when an exception occurs in to except block

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    The else part is executed when no exception occurs.


Be The First To Comment