Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Recap
Iterating over a list
Modifying lists
Working with multiple lists
Congratulations
18. Question 2

Instruction

Perfect! We've got one more question for you.

Exercise

Write a function named get_sorted_union(list1, list2) that accepts two sorted integer lists and returns a new sorted list containing unique values from both lists. Don't modify the existing lists. You can use the lists in the template to test your function. Also, you can assume that list1 and list2 each contain unique values.

For the example input:

list1 = [1, 3, 5, 7]
list2 = [1, 2, 3, 5, 6]

we expect the following output:

[1, 2, 3, 5, 6, 7]