13/18 double_list([0, 1]) returned <function double_list at 0x7fab7fc98938> instead of [0, 2]


Hello, please, can you explain what am I doing wrong?


It writes here: Oops, try again. double_list([0, 1]) returned function double_list at 0x7fab7fc98938 instead of [0, 2]

n = [3, 5, 7]
def double_list(x):
    for i in range(0,len(x)):
        x[i] = x[i] * 2
    return double_list
print double_list(n)

Great thanks in advance!


@anny_nny ,

The function is named double_list. Given that fact, what object does this statement return? ...

return double_list

Consider what it should return, instead.


Yeah, I should've used list, not function, and didn't notice it. Thank you :slight_smile:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.