Computer Science

Write a Python program to multiply all the items in a list.

Python

Python List Manipulation

3 Likes

Answer

lst = eval(input("Enter the list: "))
result = 1
for item in lst:
    result *= item
print("Result:", result)

Output

Enter the list: [1, 2, 3, 4, 5, 6]
Result: 720

Answered By

2 Likes


Related Questions