def flatten(input_list):
for el in input_list:<EOL><INDENT>if isinstance(el, collections.Iterable)and not isinstance(el, basestring):<EOL><INDENT>for sub in flatten(el):<EOL><INDENT>yield sub<EOL><DEDENT><DEDENT>else:<EOL><INDENT>yield el<EOL><DEDENT><DEDENT>
Return a flattened genertor from an input list.

    Usage:

        input_list = [['a'], ['b', 'c', 'd'], [['e']], ['f']]
        list(flatten(input_list))
        >> ['a', 'b', 'c', 'd', 'e', 'f']