Python Developer — Hard
Key points
- List comprehension is used to create a new list based on existing elements.
- The condition `if x % 2 == 0` filters out numbers that are not divisible by 2.
- The `x**2` squares each number before adding it to the list.
Ready to go further?
Related questions
