#!/usr/local/bin/python2 from itertools import chain chain_from_iterable = chain.from_iterable