What Is The Optional Statement Used In A Try Except Statement In Python

What Is The Optional Statement Used In A Try Except Statement In Python


  • 14 Feb, 2013

    Adding to what is echoed already..

     

    try:

       <doing something>

    except:

       <some error or exception>

    finally:

        <always do this as if you failed in trying above>

    Comments Received:
    Please give your suggestions and feedback:
  • 19 Jan, 2012

    There 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 exception2. Finally clause: It is useful for code that must be executed irrespective of whether an exception is generated or not.

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 downloadmela.com. All rights reserved.