i like to have my code, especially functions, work in both Python2 (until at least Python2 EOL) and Python3 (back as far as possible) without using any modules. and if it really needs a module, preferably one that comes in Python itself, and if not that, one that can be installed with pip. i think my own flatten function managed to do that. it was a bit longer, but "simpler" in the sense of not using things like generators an subgenerators. my technique to manage the recursion was sloppy. buran did better and it still meets my goals (like not needing a module). even better is that it doesn't need variable arguments like i used. and even better is that the whole thing is functional.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.