Python List Comprehension

I’ll be honest, until recently, Python list comprehensions were avoided at all cost. They seemed confusing and akin to a ternary if statement gone horribly amuck. Readability of a list comprehension is tricky because there is no delimiter to segment the various elements (modify, loop, filter logic). Simply put… A list comprehension generates a new list […]