Python is faster than R, when the number of iterations is less than 1000. Below 100 steps, python is up to 8 times faster than R, while if the number of steps is higher than 1000, R beats Python when using lapply function! Try to avoid using for loop in R, especially when the number of looping steps is higher than 1000.