The 4th example (combination of techniques) is not an actual list but a generator. As each element is produced, it is accumulated by applying the addition. That's why is so cheap in terms of memory. Even better than a list.

@michaelMy intention wasn't to compare the number of characters, but the way you express it. I kept the original var names, and wrote the Python version as I would write it myself (I believe single letter variable names are preferable for list comprehensions).

When it comes to the first example, this is not valid ruby, actually. You need one of the Rails' gems (ActiveSupport, isn't it?) to implement to_proc on symbol.