Skip to content

Commit f4e897c

Browse files
authored
Create Aayush.py
1 parent 9bccf15 commit f4e897c

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Aayush.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
# Python program to find sum of elements in list
3+
total = 0
4+
5+
# creating a list
6+
list1 = [11, 5, 17, 18, 23]
7+
8+
# Iterate each element in list
9+
# and add them in variale total
10+
for ele in range(0, len(list1)):
11+
total = total + list1[ele]
12+
13+
# printing total value
14+
print("Sum of all elements in given list: ", total)

0 commit comments

Comments
 (0)