222k views
3 votes
 myLIst = [1, 2, 45, 66, 77, 88]

White the line of code which will find the sum of elements in myList and save the value in sumElements. (Python)

 myLIst = [1, 2, 45, 66, 77, 88] White the line of code which will find the sum-example-1
User Aidonsnous
by
6.7k points

1 Answer

2 votes

Answer:

sumElements = sum(myList)

Step-by-step explanation:

Hi,

To find the sum of the elements in the list myList, we can use the sum() function in Python and store the result in sumElements as follows:

sumElements = sum(myList)

Good luck!

User ChrisF
by
7.5k points