Intermediate
Python List Comprehension Fix
Convert a nested loop into a Python list comprehension.
📝 محتوى الأمر
Refactor the following Python code into a single-line list comprehension to make it more Pythonic and efficient. Input code: result = [] for x in range(10): if x % 2 == 0: result.append(x**2)