Instructions and covered skills
Read each question carefully and select the best answer. Do not use any external resources or refer to documentation during the test. Manage your time wisely; allocate enough time for each question. Avoid distractions by turning off notifications and finding a quiet environment. Stay focused on the code snippets and think logically. Ensure you understand Python syntax and semantics before answering.
Key Areas
Generators: creation, yield, generator expressions, lazy evaluation, memory efficiency, and use cases like infinite sequences and pipelines.
Decorators: syntax, nested functions, closures, common decorators like @staticmethod, @classmethod, @property, and writing custom decorators with and without arguments.
Recommended Preparation
Practice writing simple generator functions and using them in for loops. Understand how decorators can modify function behavior without changing the source code. Review examples of decorators for logging, timing, and memoization.