We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Very nice! A couple of things that I could suggest is changing the names of the variables for clarity, since people typically use i and j for indexing and x for the iterable values:
Another optimization is using islice, which though slightly sacrificing readability improves the performance since slicing is not memory or time efficient in this case.
Divisible Sum Pairs
You are viewing a single comment's thread. Return to all comments →
Very nice! A couple of things that I could suggest is changing the names of the variables for clarity, since people typically use i and j for indexing and x for the iterable values:
Another optimization is using islice, which though slightly sacrificing readability improves the performance since slicing is not memory or time efficient in this case.