Modifying each element in a list in a function


Please provide the solution for the same.


Hi @salla123,

Your return statement is included in the for loop, therefore only the first iteration of the loop is performed.

The function parameter is x. In all statements within the double_list function, including the loop header, the list should be referred to as x rather than as n.

Remove one level of indentation from this line to move it to outside the loop ...

        return x


it worked thanks for your action