Skip to content

Commit f716ba7

Browse files
authored
Merge pull request darkprinx#33 from nikitaMogilev/patch-2
Update Day 3.md
2 parents ba5abfc + 01a96aa commit f716ba7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Status/Day 3.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,16 @@ print(",".join(lst))
227227

228228
---
229229

230+
```python
231+
'''Solution by: nikitaMogilev
232+
'''
233+
# map() digits of each number with lambda function and check if all() of them even
234+
# str(num) gives us opportunity to iterate through number by map() and join()
235+
print(','.join([str(num) for num in range(1000, 3001) if all(map(lambda num: int(num) % 2 == 0, str(num)))]))
236+
```
237+
238+
---
239+
230240
# Question 13
231241

232242
### **Question:**

0 commit comments

Comments
 (0)