Today I Learned
Python Various Ways of Writing Loops
- List Comprehension
map
A function can also be defined on the fly.
For multivariable,
zip
andmap
zip
is useful in a map of multivariable function.
As given in the reference link, one good example is
map
and list comprehension
Ref. Great Python Tricks for avoiding unnecessary loops in your code