0 out of 68 challenges solved

Multiply each element in a list by its index

Write a function called multiply_list_by_index that takes a list of numbers as input and returns a new list where each element is multiplied by its index. Use a for loop with enumerate to iterate over the list and perform the multiplication.

Input: [1, 2, 3, 4, 5]
Output: [0, 2, 6, 12, 20]

def multiply_list_by_index(numbers):
    Multiplies each element in the given list by its index.

        numbers (list): The input list of numbers.

        list: A new list with each element multiplied by its index.
    # TODO: Implement the multiply_list_by_index function