asAdvanced Playground

Creates an alias (used with import, with, except)

Python Playground
Output
Click "Run" to execute your code

In Python 3, the 'as' variable in except blocks is automatically deleted after the block exits. This prevents reference cycles with tracebacks.

Challenge

Try modifying the code above to explore different behaviors. Can you extend the example to handle a new use case?