Using two lists as two arguments in a function -17


#1

Hi everybody,

i am just trying to use attend function to solve the porblem but i am facing with this

TypeError: 'list' object is not callable

m = [1, 2, 3]
n = [4, 5, 6]

Add your code here!

def join_lists(x,y):
for i in range(len(x)) :
x.append(y(i))
return x
thanks in advance


#2

solved it, sorry =)

just misuse of () in line 3


#4

You are thinking too hard here. I don't think this is what the instructor wanted but gives the same results easier.

m = [1, 2, 3]
n = [4, 5, 6]

def join_lists(x,y):
    return x + y

print join_lists(m, n)