Function To Find sum of Numbers in List Python || Type 2 || Functions || Python

 

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

def sum(list):

    sum = 0
    for i in list:
        sum = sum + i
    print(sum)


x = sum([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
# Coded By Ashish

#ENJOY CODING


Post a Comment

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

Previous Post Next Post