What is Lazy Evaluation in Python?

You‘ve no idea how much Python has optimized the code for you

Xiaoxu Gao
Towards Data Science
6 min readSep 14, 2020

--

Photo by Holly Mandarich on Unsplash

If you’ve never heard of Lazy Evaluation before, Lazy Evaluation is an evaluation strategy which delays the evaluation of an expression until its value is needed and which also avoids repeated evaluations (From Wikipedia). It’s usually being considered as a strategy to optimize your code.

--

--

I’m a Developer with a focus on Python and Data Engineering. I write stuff to talk to myself and the world. You can find me on linkedin.com/in/xiaoxugao/.