try-finally Statement : Try : Statement PYTHON TUTORIALS


PYTHON TUTORIALS » Statement » Try »

 

try-finally Statement


try:
    try:
         ccfile = open('data.txt', 'r')
         txns = ccfile.readlines()
    except IOError:
        log.write('no txns this monthn')
finally:
        ccfile.close()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Statement
» Try