1 Comment

alternate solution using set operator -

list1 = [1, 2, 3, 4]

list2 = [3, 4, 5, 6]

list3=list1+list2

my_set = set(list3)

my_list=list(my_set)

print(my_list)

Expand full comment