def recursive_iter(enumerables):
if not is_collection(enumerables) or isinstance(enumerables, (basestring, dict)):<EOL><INDENT>yield enumerables<EOL><DEDENT>else:<EOL><INDENT>for elem in enumerables:<EOL><INDENT>for sub_elem in recursive_iter(elem):<EOL><INDENT>yield sub_elem<EOL><DEDENT><DEDENT><DEDENT>
Walks nested list-like elements as though they were sequentially available

recursive_iter([[1,2], 3])
# => 1, 2, 3