Changes

Jump to navigation Jump to search
33 bytes added ,  09:27, 5 April 2015
Line 101: Line 101:     
==== try/except/finally ====
 
==== try/except/finally ====
 +
<source lang="python">
 
try:
 
try:
 
     file = open("test.txt")
 
     file = open("test.txt")
Line 107: Line 108:  
finally:
 
finally:
 
     print "This part will be executed at the end whether the open fails or not"
 
     print "This part will be executed at the end whether the open fails or not"
 +
</source>
    
=== Loops ===
 
=== Loops ===

Navigation menu