0
Is try/cath similar to try/except?
Code in except is executed only if the exception in try occurs. Is it same with the try/catch block in Java?
2 Answers
+ 2
Yup. both just get the exception that happened
+ 2
Well, not exactly, as it is quite expensive to throw an exception in Java while it is at the basis of the language in Python, but other than that, the constructs are similar in form and features.