Answer:
The code to the given question can be given as:
Code:
def sum_list(a): #define function.
return sum(a) # return sum of elements.
Step-by-step explanation:
In the above python programming language code firstly we define a function that is "sum_list()" to define any function we use the def keyword.
In this function, we pass one parameter that is "a" add all elements in the list. To add this number we use the sum function it is the inbuilt function that returns the sum of the elements of the list as an int.