Hello, I am trying to compute sum of list elements with for loop. Following is the code for it :

But in this it is giving an error like following :

As you can see, at line 15 it is working properly, but in for loop, range method it is giving an error. So can we have sum() function like in SV or solution to this issue , so that we can get sum of the elements of list ?
Hello, I am trying to compute sum of list elements with for loop. Following is the code for it :
But in this it is giving an error like following :
As you can see, at line 15 it is working properly, but in for loop, range method it is giving an error. So can we have sum() function like in SV or solution to this issue , so that we can get sum of the elements of list ?