Код: Выделить всё
for elt in itertools.chain.from_iterable(node):
if elt is the last element:
do statement
Подробнее здесь: https://stackoverflow.com/questions/205 ... tool-chain
Код: Выделить всё
for elt in itertools.chain.from_iterable(node):
if elt is the last element:
do statement