Skip to content

Commit 1efc066

Browse files
authored
Update Day_19.md
1 parent 9391235 commit 1efc066

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Status/Day_19.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,23 @@ n = list(itertools.product(*sentence))
218218
for i in n:
219219
print(i)
220220
```
221+
---
222+
```python
223+
224+
'''Solution by: lcastrooliveira
225+
'''
226+
from itertools import product
227+
228+
def question_79():
229+
subject = ["I", "You"]
230+
verb = ["Play", "Love"]
231+
object = ["Hockey", "Football"]
232+
prod = [p for p in product(range(2), repeat=3)]
233+
for combination in prod:
234+
print(f'{subject[combination[0]]} {verb[combination[1]]} {object[combination[2]]}')
235+
236+
question_79()
237+
```
221238

222239
---
223240

0 commit comments

Comments
 (0)