What is the meaning of comprehension in the term "list comprehension"?
Solution 1:
It's actually a pretty straightforward use of a secondary definition of "comprehension":
the act or process of comprising
This sense of "comprehension" might be a little clearer if you consider the adjective "comprehensive", meaning "complete".
Solution 2:
This is a technical use of the word 'comprehension' which has moved on from its original (and currently much more common) meaning of 'understanding'.
It came out of set theory and logic, where 'comprehension' is used figuratively to mean 'implicit construction'.
Then it was borrowed by the LISP programming community (a programming language to implement lambda calculus, used by the set theory/logic community) and then for list programming construct in any programming language.
As a technical word, it means what mathematicians want it to mean.
Solution 3:
Comprehend comes from the Latin for 'grasp together', as in taking a handful of things; in modern English usage it means to mentally grasp something completely in understanding. The Latin prehendere 'take hold of, seize' also appears in words like apprehend and prehensile, which are more literally about grasping.
So a list comprehension is, conceptually, an operation that 'takes hold' of an entire list at once rather than piece by piece; the elements of the list are 'grasped together', not explicitly iterated over as in a traditional for-loop implementation of a similar operation.