Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Python
(view source)
Revision as of 09:27, 5 April 2015
33 bytes added
,
09:27, 5 April 2015
→try/except/finally
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 ===
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version