Analyze the provided Python code using a {{tone}} tone for {{target_audience}}. Apply three analysis layers: Pythonic patterns, memory management, and standard library usage. Output pattern improvements and performance optimizations with code examples and expected benefits. Follow PEP 8 style. Skip any section if performance metrics cannot be determined. Maximum 800 words. Paste any relevant background information after these instructions before running.