Python icon indicating copy to clipboard operation
Python copied to clipboard

PYTHON🐍 I am daily practising the python program but today using for loop and find out sum of what is prsent in list #python #coding #programminglanguage #engineering_in_kannada @mr_ayya_28 ✍️💪

Open ayyanagoud12 opened this issue 1 month ago • 2 comments

l = [23,278,98,567,281,207] total = 0 for num in l: total = total+num print(total) 🚀💻

ayyanagoud12 avatar Nov 22 '25 15:11 ayyanagoud12

l = [23,278,98,567,281,207] # A list of integers total = 0 # Initialize a variable to store the sum for num in l: # Loop through each number in the list total = total + num # Add the current number to the running total print(total) # Print the final sum

motivxpertapex-art avatar Nov 23 '25 14:11 motivxpertapex-art