import array as arr a= arr.array('i', [1,2,3,4,5]) Sum = 0 for i in a: Sum = sum + i print("Sum of elements", sum)
To embed this project on your website, copy the following code and paste it into your website's HTML: