In this we are going to see how to build a function to To Find sum of Numbers in List Python - Type 3 of Functions in Python Programming Language.

def sum():
    list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    sum = 0
    for i in list:
        sum = sum + i
    return sum


print(sum())
# Coded by Saahil Shaikh

#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post