From 933862e9d8cc8998b25a20d4789b845a17b6f9ee Mon Sep 17 00:00:00 2001 From: eug-vs Date: Wed, 18 Aug 2021 21:51:24 +0300 Subject: fix: reformat text and correct typos --- blog/2021-08-18.md | 4 +--- 1 file changed, 1 insertion(+), 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 -- cgit v1.2.3