advanced
Code Refactoring
Refactor a specific snippet of code for better readability and performance.
📝 Prompt Inhoud
Review the provided Python function and refactor it to improve readability and reduce time complexity. Explain the changes you made: [Insert code here]