intermediate
Refactor Python Code
Improve code readability and performance in Python.
📝 Contenuto del prompt
Review the Python code snippet below. Refactor it to improve readability, adhere to PEP 8 standards, and optimize for performance. Provide the refactored code and briefly explain the major changes made.
[Paste code here]