Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Python
(view source)
Revision as of 09:27, 5 April 2015
163 bytes added
,
09:27, 5 April 2015
→try/except/finally
Line 101:
Line 101:
==== try/except/finally ====
==== try/except/finally ====
+
try:
+
file = open("test.txt")
+
except:
+
print "Could not open file"
+
finally:
+
print "This part will be executed at the end whether the open fails or not"
+
=== Loops ===
=== Loops ===
==== For ====
==== For ====
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