Intermediate
Python Code Refactoring
Refactor a snippet of Python code for better readability and efficiency.
📝 Contenu du Prompt
Refactor the following Python code to improve its readability, efficiency, and adherence to PEP 8 standards. Focus on reducing redundancy and adding docstrings.