Merge several sorted sequences into a sorted list. Assuming l1, l2, l3...ln sorted sequences, return a list that contain all the items of l1, l2, l3...ln in ascending order. Input values doesn't need to be lists: any iterable sequence can be used.
(*ln)
| 36 | |
| 37 | |
| 38 | def merge(*ln): |
| 39 | """ Merge several sorted sequences into a sorted list. |
| 40 | |
| 41 | Assuming l1, l2, l3...ln sorted sequences, return a list that contain |
| 42 | all the items of l1, l2, l3...ln in ascending order. |
| 43 | Input values doesn't need to be lists: any iterable sequence can be used. |
| 44 | """ |
| 45 | return list(xmerge(*ln)) |