list comprehension in python

Old Dog’s New Tricks – List Comprehension in Python

If you were trying to come up with a list of iconic programming idioms, “For Loops” would probably make the cut.   For someone like me that learned about loops via COBOL’s crazy “Perform” loop syntax – changing paradigms (yet again) can sometimes prove difficult.

I was attracted to Python initially because it is different.  So I have done my best to leave my preconceived notions about writing code behind as I embraced the challenge of becoming an effective Python coder.

List Comprehension proved to be a concept that I had to invest more time into studying than other Pythonic approaches.

(more…)