intermediate
Python Code Refactoring
Review and optimize Python code for better performance and readability.
📝 Prompt Content
Review the provided Python code snippet. Identify any security risks, performance bottlenecks, or violations of PEP 8 style guidelines. Refactor the code to improve efficiency and readability. Output the final optimized code and a bulleted list explaining every change you made.