I have two lists in Python:
list1 = [1, 2, 3, 4]
list2 = [3, 4, 5, 6]
I want to merge them into a single list such that:
- No duplicates remain
- The original order of elements is preserved
For the example above, the desired output is: [1, 2, 3, 4, 5, 6].
I tried using list(set(list1 + list2)) but it doesn't preserve the order.
How can I achieve this efficiently in Python?