solutions

Square elements using list comprehensions

Write a function that receives a list of integers and returns a list with all the elements squared using list comprehensions.

square_elements([1, 2, 3, 4, 5]) == [1, 4, 9, 16, 25]

Test Cases

tests

[]