write a python program to read N element into a list and print the product at element
its very important !!!!!
Answers
Answered by
3
Answer:
# Python program to multiply all values in the
# list using traversal
def multiplyList(myList) :
# Multiply elements one by one
result = 1
for x in myList:
result = result * x
return result
# Driver code
list1 = []
n = int(input("Enter number of elements : "))
for i in range(0, n):
ele = int(input())
list1.append(ele) # adding the element
print(multiplyList(list1))
Similar questions