Solutions will be available when this assignment is resolved, or after a few failing attempts.

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


def square_elements(a_list): pass