Write a Python function that takes a list of numbers as input and returns the product of all the numbers in the list.
Example 1:
Input: [1, 2, 3, 4, 5]
Output: 120
Example 2:
Input: [6, 7, 2, 0, 1]
Output: 0
Use a loop to iterate through the list.
def multiply_numbers(lst):
result = 1
for num in lst:
result *= num
return result
NOTEOwing to browser caching, any code input into the Trinket IDE might carry over across page refreshes or when transitioning between different questions. To commence with a clean slate, either click on the 'Reset Button' found within the IDE's Hamburger icon (☰) menu or resort to using Chrome's Incognito Mode.