Answer to Question #222678 in Python for kaavya

Question #222678

Product of Elements in the List:

You are given a space-separated list of integers as input. Write a program to print the product of these numbers.


1
Expert's answer
2021-08-03T03:43:35-0400
def func(list1):
    j = 1
    for i in list1:
        j = i * j
    return j
func([3,4,5])
60

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS