In the paragraph after the code for solution_1 in Section 7.1, 11641 should be 14641:
This solution is the slowest solution because it requires 4 loops, and more importantly, it tests all the different combinations (11641) -> (14641) of 4 integers between 0 and 10 to retain only combinations whose sum is 10. We can of course get rid of the 4 loops using itertools, but the code remains slow:
In the paragraph after the code for
solution_1
in Section 7.1, 11641 should be 14641:Thanks!