Difference between revisions of "Try:"

From wikieduonline
Jump to navigation Jump to search
(Created page with " <pre> try: print(x) except: print("An exception occurred") </pre> == See also == * {{Python}} Category:Python")
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{lowercase}}
 +
* https://www.w3schools.com/python/python_try_except.asp
  
<pre>
+
try:
try:
+
  print(x)
  print(x)
+
[[except:]]
except:
+
  print("An exception occurred")
  print("An exception occurred")
+
 
</pre>
+
== Related ==
 +
* <code>[[def]] yourfunctionname:</code>
 +
* <code>[[class]] yourclassname:</code>
 +
* <code>[[return (Python)|return]]</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 08:51, 15 March 2022

Advertising: