The code given below accepts a list of numbers as an argument and returns the sum of all even numbers in the list. Observe the following code carefully and rewrite it after removing all syntax and logical errors. Underline all the corrections made.
def sum_even(lst):
sum = 0
for i in range(lst):
if i % 2 = 0:
sum += i
else
continue
return sum
Answer:
Answer by student
Detailed answer by teachoo
The rest of the post is locked. Join Teachoo Black to see the full post.