Your answer is not correct, it does not do what the assignment asks. You need to remove commn, not get the unique elements of both lists into one list. that code will return [1,2,3,4,5,6] and you need to remove 3 and 4 as they are common between both lists
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)
Your answer is not correct, it does not do what the assignment asks. You need to remove commn, not get the unique elements of both lists into one list. that code will return [1,2,3,4,5,6] and you need to remove 3 and 4 as they are common between both lists
True! Here is a solution that does that:
https://pastebin.com/raw/yQaSvsxY
Thnx for the reply Ardit, I made it work, just didn't want to post code that spoils the result.