Skip to content

Commit fd4874f

Browse files
authored
Sort Array By Parity
1 parent 06650e8 commit fd4874f

File tree

1 file changed

+4
-4
lines changed
  • Source Code/905. Sort Array By Parity

1 file changed

+4
-4
lines changed

Source Code/905. Sort Array By Parity/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
```
33
class Solution:
44
def sortArrayByParity(self, A):
5-
even=[]
6-
odd=[]
5+
even = []
6+
odd = []
77
for x in range(len(A)):
8-
if(A[x]%2==0):
8+
if A[x] % 2 == 0:
99
even.append(A[x])
1010
else:
1111
odd.append(A[x])
12-
return(even+odd)
12+
return even + odd
1313
```

0 commit comments

Comments
 (0)