by theamk · 7y ago · 0 comments
For simple things, you have list comprehensions and things like “sum”, while for complex things one should reach for numpy.
That said, high-performance Python does generally discourage the use of loops in favor of vectorised operations.