Python Practice
Eliminate mistakes in slicing, sorting, mutability, aliasing, iteration, and complexity.
Recommended resources
- Python 3 Tutorial — Python Software Foundation
Instructions
- Predict exact repr output before execution.
Ordered items
- Aliasing and shallow copy
- Slicing and key-based sorting
- Make membership linear-time overall
- List mutation and sorting finger exercise
- Asymptotic complexity finger exercise
Completion
Explain every mutation and asymptotic cost in the selected code.