It’s important to program your code efficiently. Efficient code manages errors and exceptions and cleans up memory after it ends. The try-except statements are helpful in handling errors that are detected during execution.
Respond to the following in a minimum of 175 words:
- What are the 2 categories of errors when debugging code? How can the try-except statements handle errors in Python? Provide a code example that supports your comments.