Skip to content

Commit d472cd4

Browse files
committed
Merge branch 'master' of github.com:CodeToExpress/dailycodebase
2 parents bea0338 + 2ee4fd9 commit d472cd4

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Name:DiptoChakrabarty
2+
# Date:16/01/2019
3+
# Day20
4+
5+
l=list(map(int,input().split()))
6+
t=[]
7+
k=len(l)
8+
for i in range(0,k,2):
9+
d=l[i:i+2]
10+
t.append(d)
11+
12+
print(t)

day20/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ Write a program to divide the given array into sub arrays where each sub array i
77
## Example
88

99
```
10-
input: partition([1,2,3,4,5,6,7,8], 2)
11-
output: [[1, 2], [3, 4], [5, 6], [7, 8]]
12-
13-
input: partition([1,2,3,4,5,6,7], 2)
14-
output: [[1, 2], [3, 4], [5, 6], [7]]
10+
input: partition([1,2,3,4,5,6,7,8], 2)
11+
output: [[1, 2], [3, 4], [5, 6], [7, 8]]
12+
13+
input: partition([1,2,3,4,5,6,7], 2)
14+
output: [[1, 2], [3, 4], [5, 6], [7]]
1515
```
1616

1717
![ques](./ques.png)
@@ -85,4 +85,4 @@ function partition (array, size) {
8585
}
8686
return partitionedArray;
8787
}
88-
```
88+
```

0 commit comments

Comments
 (0)