Write a function sum_of_squares(numbers) that takes a list of numbers and returns the
sum of their squares. An empty list gives 0. Use a comprehension rather than an
explicit loop.
Example
sum_of_squares([1, 2, 3]) -> 14
Implement this function:
def sum_of_squares(numbers: list):
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: numbers.
Input
[1, 2, 3]
Output
14