summaryrefslogtreecommitdiff
path: root/blog
diff options
context:
space:
mode:
Diffstat (limited to 'blog')
-rw-r--r--blog/2021-08-18.md4
1 files changed, 1 insertions, 3 deletions
diff --git a/blog/2021-08-18.md b/blog/2021-08-18.md
index 6567f35..6655824 100644
--- a/blog/2021-08-18.md
+++ b/blog/2021-08-18.md
@@ -14,9 +14,7 @@ totals = [271.01, 1078.61, 3333.44]
```
## Thinking
-Now, let's analyze the problem a bit. We'll try solving the problem for the total of `3333.44` in this example.
-
-There's **12** prices in the list. Now, let's suppose our total was made up from 2 prices. It could be any 2 numbers from the list, in fact there are a lot of possible pairs! To be precise, there are **66** of them! Luckily Python has an amazing package `itertools` which allows you to work with combinatorics. We can now list all these pairs:
+Now, let's analyze the problem a bit. There are **12** prices in the list. Let's suppose our total was made up from 2 prices. It could be any 2 numbers from the list, in fact there are a lot of possible pairs. To be precise, there are **66** of them! Luckily Python has an amazing package `itertools` which allows you to work with combinatorics. We can now list all these pairs:
```python
from itertools import combinations