Skip to content

Commit 3c66759

Browse files
Update Day 3.md
Another solution for Question 11
1 parent b393683 commit 3c66759

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Status/Day 3.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,14 @@ data = list(filter(lambda i:int(i,2)%5==0,data)) # lambda is an operator that
151151
print(",".join(data))
152152
```
153153

154+
**OR**
155+
156+
```python
157+
data = input().split(',')
158+
data = [num for num in data if int(num, 2) % 5 == 0]
159+
print(','.join(data))
160+
```
161+
154162
---
155163

156164
# Question 12

0 commit comments

Comments
 (0)