Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.

instruction Back
Instruction

Using the as Keyword with Exceptions

Using the as Keyword when Catching Exceptions When you use the as keyword in Python, you are creating what is known as an alias. This alias can be named anything, just like a variable can, because it is a variable. You likely will see aliasing when importing modules, but another place you might use the as keyword is when you want to print a specific error message from an error. For example, ...