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
Write a Python program to find the second most repeated word in a given string.
Write a Python program to change a given string to a new string where the first and last characters have been exchanged.
Write a Python program to get the smallest number from a list.
Write a Python program to append a list to the second list.