DEV Community

Discussion on: Comprehensions in python: What are list, dict, and set comprehensions?

Collapse
 
xtofl profile image
xtofl

Comprehensions are not beginner-friendly

I wonder. I think it depends on how the beginner has begun. Do you happen to have any research on that statement? Because I can hardly believe that a beginner would have more trouble reading [x*x for x in numbers] than with the 4-liner you would need, unless they already have been trained to recognise it as a pattern.

Collapse
 
ezinne_anne profile image
Ezinne AnneπŸ˜ŽπŸ‘©πŸΏβ€πŸ’»

Comprehensions are not beginner-friendly especially for folks that are new to programming. It maybe easier for folks coming from other languages, and yes I did research.

Collapse
 
xtofl profile image
xtofl

Thanks! I'm interested in the research for it turns my world view upside down.