medium
Refactor Python Code
Optimize and clean up a provided Python code snippet for better readability.
📝 프롬프트 내용
Review the following Python code snippet. Refactor it to be more efficient, readable, and Pythonic by using list comprehensions or built-in functions where appropriate. Add comments explaining the changes: [code snippet: x = []; for i in range(10): x.append(i**2)]