Stop using for loop in Python
Random walk example
First, I want to admit that this title is clickbait. For-loop is very important in Python. It can help people clarify logic, and many times it is a fast way to create a small program.
However, for loop is damn slow in Python.
There are many reasons that Python is slower than other language such as C and Java. You can understand more by checking the following article.