I've recently took up Python programming and I've written a simple function that takes two lists and returns a new one that does a reunion of the two lists. However when I run the code it returns an empty list. Please help:
x = [1, 2, 3]
y = [4, 5, 6]
def reunion(list_of_numbers1,list_of_numbers2):
union_list = list()
for i in range(0,len(list_of_numbers1)):
if list_of_numbers1[i] in list_of_numbers2 is True:
union_list.append(i)
del list_of_numbers1[i]
del list_of_numbers2[i]
return union_list
z = reunion(x,y)
print(z)