给定三组有序数列，编写一个函数来合并它们并按升序排序。


list1 = [1, 3, 5]
list2 = [2, 4, 6]
list3 = [0, 7, 8, 9]
```
def merge_sorted_lists(list1, list2, list3):
    merged_list = []
    merged_list.extend(list1)
    merged_list.extend(list2)
    merged_list.extend(list3)
    return sorted(merged_list)
  
list1 = [1, 3, 5]
list2 = [2, 4, 6]
list3 = [0, 7, 8, 9]

sorted_list = merge_sorted_lists(list1, list2, list3)
print(sorted_list)
```