Латарцев Константин Владимирович, ФКИ, группа 105 SeqJoin 10070
Chiganov Aleksey Andreevich M108 Facultet of Space Research MSU SeqJoin 9403
t1def joinseq(*seq):t1def joinseq(*seq):
2    iterators = [iter(seq_) for seq_ in seq]2    iterators = [iter(seq_) for seq_ in seq]
3    val = [next(i) for i in iterators]3    val = [next(i) for i in iterators]
4    while True:4    while True:
5        min_item = min(val)5        min_item = min(val)
6        yield min_item6        yield min_item
7        idx = val.index(min_item)7        idx = val.index(min_item)
8        val[idx] = next(iterators[idx], None)8        val[idx] = next(iterators[idx], None)
9        if val[idx] == None:9        if val[idx] == None:
10            val.pop(idx)10            val.pop(idx)
11            iterators.pop(idx)11            iterators.pop(idx)
12            if val == []:12            if val == []:
13                break13                break
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op