Инюшин Алексей 317 SeeSaw 10092
Байдецкая Марина 319/2 SeeSaw 10069
f1def seesaw(sequence):f1def seesaw(sequence):
n2    even = []n2    evens = []
3    odd = []3    odds = []
4    for i in sequence:4    for number in sequence:
5        if i % 2 == 0:5        if number % 2 == 0:
6            even.append(i)6            evens.append(number)
7        else:7        else:
t8            odd.append(i)t8            odds.append(number)
9    even_index, odd_index = (0, 0)9    i, j = (0, 0)
10    while even_index < len(even) or odd_index < len(odd):10    while i < len(evens) or j < len(odds):
11        if even_index < len(even):11        if i < len(evens):
12            yield even[even_index]12            yield evens[i]
13            even_index += 1
14        if odd_index < len(odd):
15            yield odd[odd_index]
16            odd_index += 113            i += 1
14        if j < len(odds):
15            yield odds[j]
16            j += 1
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op