I have recently asked this question: How to flatten a list of lists without using for loops, where I was looking for suggestions on how to improve the performance and readability of a snippet of Python code I had written.
I understand that the original question was opinionated, and I now know this is not the type of questions we are looking for on the forum, however I was wondering if there are ways I could improve the question (I have been banned from asking further questions on SO, and this is a community I really enjoy using, both asking and answering questions.)
map
count?), and you even accepted an answer that uses a loop. Optimising performance is rather arbitrary when the use-case is not well-defined – what versions are you targeting, how large is the data, what is the common or worst case, ...? The readability part is dubious because that is pure opinion. Ideally, you wouldn't have any such constraints but merely ask a "How to flatten a nested, jagged list"?