bkz: Soru Sorarken Sıkça Düşülen Hatalar #4
xs = [1, 2, 3, 10, 15, 4, 5, 6, 18, 7, 20, 8]
ys = itertools.chain.from_iterable([list(g[1]) for g in itertools.groupby(xs, lambda x: x<10) if g[0]])
print(list(ys))
bkz: Soru Sorarken Sıkça Düşülen Hatalar #4
xs = [1, 2, 3, 10, 15, 4, 5, 6, 18, 7, 20, 8]
ys = itertools.chain.from_iterable([list(g[1]) for g in itertools.groupby(xs, lambda x: x<10) if g[0]])
print(list(ys))